Hi all, Need help. I have written a code to extract and load csv file in application itself. Fortunately it is working fine but when the columns are more in the file, the columns are not visible since they get hidden behind the screen. You can try loading a csv file with more columns. So how can I have a scroll button here so that I can see all columns?
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(title = "Loading data"),
dashboardSidebar(fileInput("datafile","Choose the csv file",multiple = TRUE,
accept = c("text/csv","text/comma-separated-values,text/plain",".csv"))),
dashboardBody(
fluidRow(box(tableOutput("contents"),width = 5000)
)
))
server <- function(input,output){
output$contents <- renderTable({
file_to_read <- input$datafile
if(is.null(file_to_read))
return(NULL)
read.csv(file_to_read$datapath)
})
}
shinyApp(ui, server)