小编Col*_*lin的帖子

在Shiny dataTableOutput中控制表格宽度

我无法使用该函数控制我添加到闪亮应用程序的数据表的宽度dataTableOutput().我试图width在函数中使用参数,但它在输出中没有任何改变,并且没有错误〜它没有告诉我它忽略了width参数.

library(shiny)
library(shinythemes)

ui <- fluidPage(theme = shinytheme("Spacelab"),
            fluidRow(
              column(6,dataTableOutput(outputId = "table")),
              column(6,p(textOutput("para")))
  )
)

server <- function(input, output){

  df <- as.data.frame(matrix(0, ncol = 15, nrow = 20))

  output$table <- renderDataTable({df})

  output$para <- renderText({
    text <- rep(x = "Hello World",1000)
  })
}
shinyApp(ui = ui,server = server)
Run Code Online (Sandbox Code Playgroud)

r shiny

13
推荐指数
2
解决办法
2万
查看次数

标签 统计

r ×1

shiny ×1