下面是我写的代码。我不能formattable
在我的闪亮中使用。formattable
有助于格式化表格并改善可视化效果。
library("shinydashboard")
library("shiny")
library("formattable")
body <- dashboardBody(
fluidRow(
column(width = 12,
box(tableOutput(formattable(test.table, list())))
)
)
)
ui <- dashboardPage(
dashboardHeader(title = "Column layout"),
dashboardSidebar(),
body
)
server <- function(input, output) {
test.table <- data.frame(lapply(1:8, function(x) {1:10}))
output$table <- renderTable({test.table})
}
shinyApp(ui = ui, server = server)