R Shiny - Using Selectinput as column selection to subset data frame
问题 I am using Shiny that takes in a user's txt file. The files composition is completely up to the user - there are no set headers for the file. data_vals <- reactive({ file1 <- input$file1 if (is.null(file1))return(NULL) read.table(fill=TRUE,file=input$file1$datapath, header=TRUE, colClasses = "factor")}) From this file, I create a drop down list from the header file that the user submitted: observe({ req(input$file1) dsnames <- names(data_labels()) cb_options <- list() cb_options[dsnames] <-