'Rshiny won't accept any inputID except "file"
no idea what the problem is here. Any time I give an inputID to fileInput other than "file", I'll get an error saying "Error: '[inputID here]' not found."
ui <- fluidPage(
titlePanel("BF591 Final"),
sidebarPanel(
fileInput("file1", "Upload metadata in CSV or TSV format.", accept = c(".csv", ".tsv"))
),
mainPanel(
tableOutput("sample_info_tb")
)
)
server <- function(input, output) {
load_meta <- reactive({
if(is.null(file1)){return()}
metadata_df <- read.csv(input$file1$datapath, row.names=1)
return(metadata_df)
})
options(shiny.maxRequestSize=30*1024^2)
output$sample_info_tb <- renderTable({
req(input$file1)
load_meta()
})
}
shinyApp(ui = ui, server = server)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
