在Shiny应用程序中使用{gtsummary}渲染表格是否可行?
library(gtsummary)
# make dataset with a few variables to summarize
iris2 <- iris %>% select(Sepal.Length, Sepal.Width, Species)
# summarize the data with our package
table1 <- tbl_summary(iris2)
table1
在一个Shiny应用程序中: ->
shinyApp(
ui = fluidPage(
fluidRow(
column(12,
tableOutput('table')
)
)
),
server = function(input, output) {
output$table <- renderTable(table1)
})
谢谢您。
gt
中的render_gt
会更好看。 - Ben