Hi,
I am trying to use Shiny to do this:
I have 10 rds files in the /app/data/ directory.
I want to let the user choose one of this files and then read it into R to make some data processing.
I have tried this in ui.R:
selectInput("user_file", "Usuario", list.files("data/"), selected = list.files("data/")[1])
Then I am trying to read the file in server.R:
shinyServer(function(input, output, session) {
data_plot <- reactive({
readRDS(file.path("data", input$user_file))
})
}
or
shinyServer(function(input, output, session) {
data_plot <- reactiveFileReader(1000, session, reactive(input$user_file), readRDS)
}
None of them seems to work.
Any help please?
Thanks,
Aurelio