Shiny中是否有R函数来加载更多行的文件

时间:2019-06-15 18:43:23

标签: r shiny

我有下面的代码将文件读取到R Shiny中,但是一旦加载数据,就会出现“超出最大上传大小”错误。我知道数据中还有更多行。但是不能显示出来吗?

#install.packages("shiny")
#library(shiny)
server=function(input,output,session){
output$contents <- renderTable({
file_to_read <- input$datafile
if(is.null(file_to_read))
  return(NULL)

    read.csv(file_to_read$datapath)
      })
 }
 ui <- fluidPage(
 tabsetPanel(
 tabPanel("tab1",
 sidebarLayout(
 sidebarPanel(fileInput("datafile","Choose the csv file",multiple = TRUE, 
         accept = c("text/csv","text/comma-separated- 
    values,text/plain",".csv")),radioButtons("Size","Select the size of 
    the font",choices = c("1","2","3"),selected = 1)
          ),
    mainPanel(tableOutput("contents"))
            )
      )
         )
            )
    shinyApp(ui = ui, server = server)

0 个答案:

没有答案