I need a line in my server.r code of this type (basically in the server I would arrange all inputs from ui.r in a list):
x<- list(input$field1,input$field2,input$field3, etc... until n=100)
x<- x[!= is.null(x)]
h4(x)
The code is used inside a renderUI({}). When I write it manually, it works fine. But surely there must be a way to use cat and paste (or other functions) to write it more concisely.
Using the following would not work and I don't get why:
x <- cat(paste("input$field", 1:100,",", sep = ""))
list(x)
Any help/advice would be highly appreciated
ps: I need this because my inputs are generated depending on a button, and so it may be that fields with large Id's such as field99 are not created and I need to test which ones have been created.
Cheers