How to save datatable shiny app (or DT::datatable) as html page?

400 views
Skip to first unread message

Clint Weathers

unread,
Dec 18, 2015, 3:15:29 PM12/18/15
to Shiny - Web Framework for R
I must be missing something obvious, but I want to save a shiny datatable as a webpage and just can't see how in the docs.

If you use DT from inside RStudio, you can "export as webpage" but I need to run this and have it save out via script.
As far as that goes, I'd be just as happy to use DT as shiny and renderDataTable.

Does this have to be done via RMarkdown?  

Thanks

Joe Cheng

unread,
Dec 18, 2015, 6:26:21 PM12/18/15
to Clint Weathers, Shiny - Web Framework for R
If you have just a DT::datatable() object (call it "x"), then you can call htmlwidgets::saveWidget(x, "filepath.html") to save it as an HTML page.

--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/1f361798-ed6e-49fe-9546-48266e59e3e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages