clarewest / blog-comments

Repo to store comments on my blog as issues
0 stars 0 forks source link

blog/post/making-tables-shiny/ #5

Open utterances-bot opened 1 year ago

utterances-bot commented 1 year ago

Making Tables Shiny: DT, formattable, and reactable - Clare's Blog

Demo of popular packages for generating interactive tables suitable for Shiny apps

https://clarewest.github.io/blog/post/making-tables-shiny/

chazmati commented 1 year ago

Thank so much for this write-up!

I'm just learning Shiny; how did you pass these table outputs (e.g. formattable) to Shiny? Which ui Render() or output() functions did you use? htmlOutput?

jmtrak commented 1 year ago

Thanks a lot, you helped me a lot to put icons in a DT in Shiny.

mrinmayik commented 1 year ago

Super helpful post!! @chazmati, I got formattable to work in Shiny like so:

On the UI side: DT::dataTableOutput("my_table") On the server side:

output$my_table <- renderDataTable(datatable(my_dataframe,
                                             options=list(pageLength=12,
                                                          scrollX=TRUE,
                                                          autoWidth=TRUE),
                                             filter = 'top',
                                             rownames = FALSE) %>%
                                formatStyle(c("FDR-corrected p"), backgroundColor = styleInterval(brks, clrs)))