Why is inFile1 <- input$file1 in the code below necessary for the code to work?
Why can't I just reference the datapath directly in read_excel(inFile1$datapath, 1) ?
ui <- fluidPage(
fileInput('file1', 'Upload Data',accept = c(".xlsx")
)
server <- function(input, output){
output$outcome <- renderDataTable({
inFile1 <- input$file1
read_excel(inFile1$datapath, 1)
})
}