Shiny R ColVis扩展:组列

时间:2015-06-25 05:48:55

标签: r datatables shiny

我想知道是否可以显示/隐藏组列?我在Datatables.net看到它是可能的,但我不知道如何在Shiny R中做到这一点。

此外,是否可以在运行应用程序时初始化要隐藏的列?

1 个答案:

答案 0 :(得分:1)

I'm not sure about the first question, but having some columns hidden when you initialize is possible idx <- 1:2 DT::datatable(... options = list( columnDefs = list(list(visible = FALSE, targets = idx)) ) ) Please see http://rstudio.github.io/DT/ for more information about the DT package.