A shiny Module that imports csv file
mod_csv_fileInput(id, label = "CSV file") mod_csv_file(input, output, session, stringsAsFactors = TRUE)
id | shiny id |
---|---|
label | fileInput label |
input | internal |
output | internal |
session | internal |
stringsAsFactors | logical: should character vectors be converted to factors? |
library(shiny) library(DT)#> #>#>#> #>#>#> #>if (interactive()){ ui <- fluidPage( mod_csv_fileInput("fichier"), DTOutput("tableau") ) server <- function(input, output, session) { data <- callModule(mod_csv_file,"fichier") output$tableau <- renderDT({data()}) } shinyApp(ui, server) }