Open utterances-bot opened 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?
Thanks a lot, you helped me a lot to put icons in a DT in Shiny.
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)))
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/