我试图浏览多个文件并在下拉框中显示上传文件列表,但在选择任何选项时我无法生成其数据。我知道这是因为我不是在阅读csvs而且我不知道如何将该文件与其数据相关联。请指导我。
data_sets <- c("mtcars", "morley", "rock")
body <- dashboardBody(
tabItems(
tabItem(tabName = "dashboard",
h2("Dashboard tab content"),
sidebarPanel(
fileInput("file", "Choose CSV File",multiple = TRUE,
accept = c(
"text/csv",
"text/comma-separated-values,text/plain",
".csv")
output$choose_dataset <- renderUI({
data_sets<-rbind(data_sets,c(input$file[1]))
selectInput("dataset", "Data set", as.list(data_sets))
}
)