I found this solution, but now I need to send the input to a function as many times as there is input. How could I do that? Please see below. The code below takes in the input and sends it to the glycoPipe function only once. Thanks.
ui <- fluidPage(
actionButton("add", "Select files to combine")
)
observeEvent(input$add, {
if(input$combinefiles == "Y"){
insertUI(
selector = "#add",
where = "afterEnd",
#ui = textInput(paste0("txt", input$add),
# "Insert some text")
selectInput("filescombine",label = h5(strong("PLEASE CHOSE FILES TO COMBINE. To undo selection select the selected file again and press delete")),c(Choose='', list.files("~/Development/fileTest/GLYCOUNT/DATA")), multiple=TRUE, selectize=TRUE)
)
output$combining <- renderPrint({
selections <- unlist(input$filescombine)
result <- glycoPipe(inFileName(), xValue = NULL, xxValue = NULL, xxxValue = NULL, xxxxValue = NULL, xxxxxValue = NULL, input$selectYN, V = NULL, other = NULL, largeTable = NULL, LSelection = NULL, glycoFile = NULL, filesValue = NULL, indexNumber = NULL, question = NULL, MMF = NULL, userA= NULL, input$glyCountparamsfile, fOfData = NULL, combineResult = NULL, unlist(input$filescombine))
selections
})
}
})