在R轴上显示一个非常大的网格表

在R轴上显示一个非常大的网格表,r,shiny,large-data,r-grid,gtable,R,Shiny,Large Data,R Grid,Gtable,我想在Shiny中显示一个大的网格表,但我找不到一种方法,因为Shiny似乎总是截断我的表。我之所以使用网格表,是因为它提供了一些需要在表中实现的特性。我设法显示了左右视图,但上下视图总是被截断。这是我的密码: 用户界面: 服务器: shinyServer(function(input, output,session) { mat <- matrix(8,nrow=50,ncol=50) example <- tableGrob(mat,rows=NULL,cols=NULL) ou

我想在Shiny中显示一个大的网格表,但我找不到一种方法,因为Shiny似乎总是截断我的表。我之所以使用网格表,是因为它提供了一些需要在表中实现的特性。我设法显示了左右视图,但上下视图总是被截断。这是我的密码:

用户界面:

服务器:

shinyServer(function(input, output,session) {
mat <- matrix(8,nrow=50,ncol=50)
example <- tableGrob(mat,rows=NULL,cols=NULL)
output$out <- renderPlot({grid.draw(example)})
             })
shinyServer(功能(输入、输出、会话){
mat尝试这样的代码:

 ui <- fluidPage(
     sidebarLayout(
     sidebarPanel(
          fileInput("file1", "Choose CSV File",
                accept = c("text/csv",
                "text/comma-separated-values,text/plain",
                ".csv")
    ),
    tags$hr(),
    checkboxInput("header", "Header", TRUE)
  ),
  mainPanel(
    tableOutput("contents")
  )
)
)

   server <- function(input, output) {
     output$contents <- renderTable({
     inFile <- input$file1
     if (is.null(inFile))
    return(NULL)
    df <- read.csv(inFile$datapath, header = input$header)
    print(df[,c(1:16)]) # display only the first 16th columns of your dataset
 })
}

shinyApp(ui, server)
ui
 ui <- fluidPage(
     sidebarLayout(
     sidebarPanel(
          fileInput("file1", "Choose CSV File",
                accept = c("text/csv",
                "text/comma-separated-values,text/plain",
                ".csv")
    ),
    tags$hr(),
    checkboxInput("header", "Header", TRUE)
  ),
  mainPanel(
    tableOutput("contents")
  )
)
)

   server <- function(input, output) {
     output$contents <- renderTable({
     inFile <- input$file1
     if (is.null(inFile))
    return(NULL)
    df <- read.csv(inFile$datapath, header = input$header)
    print(df[,c(1:16)]) # display only the first 16th columns of your dataset
 })
}

shinyApp(ui, server)