简体   繁体   English

R,有光泽:使用ColVis DataTable插件

[英]R, shiny: using ColVis DataTable plugin

I wish to use the ColVis plugin with DataTable in shiny. 我希望将ColVis插件与DataTable一起使用。

ColVis ColVis

The plugin provides the user with a nice button/dropdown selection menu to control column visibility. 该插件为用户提供了一个很好的按钮/下拉选择菜单来控制列可见性。

In my latest attempt to get this working, I have: 在我最近的尝试中,我有:

  • added dataTables.colVis.js to my app's wwww directory 将dataTables.colVis.js添加到我的应用程序的wwww目录中
  • tried includeScript("www/dataTables.colVis.js") 试过includeScript(“www / dataTables.colVis.js”)
  • also tried tags$head(tags$script(src="dataTables.colVis.js")) as a MainPanel argument 还试过标签$ head(标签$ script(src =“dataTables.colVis.js”))作为MainPanel参数
  • see no errors, in R, or in the Chrome console 在R或Chrome控制台中看到没有错误
  • but see no button providing access to column selection 但是看不到提供列选择权限的按钮

I am accustomed to debugging javascript, but at a loss here for finding and debugging the javascript created from ui.R by Shiny. 我习惯于调试javascript,但在这里找不到用于查找和调试由ui.R由Shiny创建的javascript。

Are there tutorials on how to debug a shiny a shiny app at the level of javascript? 是否有关于如何在javascript级别调试闪亮的应用程序的教程? Has anyone had success using ColVis in shiny? 是否有人使用ColVis成功闪亮? Is there a better, Shiny-native way to allow the user easy access to hide/display DataTable columns? 是否有更好的,有光泽的原生方式允许用户轻松访问隐藏/显示DataTable列?

Thanks, 谢谢,

  • Paul 保罗

Have a look at new package from RStudio DT ( https://github.com/rstudio/DT )? 看一下RStudio DT的新软件包( https://github.com/rstudio/DT )? Here http://rstudio.github.io/DT/extensions.html you could find an example of what you need. http://rstudio.github.io/DT/extensions.html,您可以找到您需要的示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM