Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/82.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R 如何为闪亮的数据表添加列边框?_R_Datatable_Shiny_Shinydashboard_Dt - Fatal编程技术网

R 如何为闪亮的数据表添加列边框?

R 如何为闪亮的数据表添加列边框?,r,datatable,shiny,shinydashboard,dt,R,Datatable,Shiny,Shinydashboard,Dt,我有一个闪亮的数据表,看起来像这样: 但是,我希望所有单元格周围都有完整的边框,使其看起来更像excel工作表。我知道在Shining表中,调用bordered=T非常简单,但这对Shining中的datatable不起作用 这是我的UI代码: fluidRow( DT::dataTableOutput("stats_table", width = "95%") ) 这是我的服务器代码: output$stats_table <- DT::ren

我有一个闪亮的数据表,看起来像这样:

但是,我希望所有单元格周围都有完整的边框,使其看起来更像excel工作表。我知道在Shining表中,调用
bordered=T
非常简单,但这对Shining中的datatable不起作用

这是我的UI代码:

      fluidRow(
        DT::dataTableOutput("stats_table", width = "95%")
      )
这是我的服务器代码:

output$stats_table <- DT::renderDataTable(DT::datatable({
  # Do not show a plot when the page first loads
  # Wait until the user clicks "Plot" button
  if (input$plot_graph_button == 0)
    return()

  data <- summary_table
  #### Do some filtering here ####
  data

}))

output$stats\u table您可以使用
单元格边框条带
类。查看更多选项

 output$stats_table <- DT::renderDataTable({
               # Do not show a plot when the page first loads
               # Wait until the user clicks "Plot" button
               # if (input$plot_graph_button == 0)
               # return()

       data <- datatable(head(iris), class = 'cell-border stripe')
       #### Do some filtering here ####
       data

})

output$stats\u table您可以使用
单元格边框条带
类。查看更多选项

 output$stats_table <- DT::renderDataTable({
               # Do not show a plot when the page first loads
               # Wait until the user clicks "Plot" button
               # if (input$plot_graph_button == 0)
               # return()

       data <- datatable(head(iris), class = 'cell-border stripe')
       #### Do some filtering here ####
       data

})

output$stats\u table如果您包含一个最小的可复制示例,则更容易提供帮助:我认为这个问题已经得到了回答:。这就是你要找的吗?@aureliancallens我试过这段代码,但它实际上与我的语法不兼容。在发布我的问题之前,我确实看到了这个例子。它接近我所需要的,但不完全正确。如果你包含一个最小的可复制的例子,帮助会容易得多:我认为这个问题已经得到了回答:。这就是你要找的吗?@aureliancallens我试过这段代码,但它实际上与我的语法不兼容。在发布我的问题之前,我确实看到了这个例子。它接近我需要的,但不太正确。