So I have a shiny app and a text input that receives a single word which serves as input for a function, it looks like this in the UI:
textInputAddon(inputId="taxa",addon=icon("search"),
label=tags$h4(tags$strong("Enter the name of the taxonomic group:")),placeholder="Example: Cetacea")
Then in the server the word submited in the input is used to download a tsv file, and I render it like this:
taxaInput <- reactive({grades(input$taxa)})
output$downloadData <- downloadHandler(
filename = function() {
paste(input$taxa, ".tsv")
},
content = function(file) {
shiny::withProgress(
message=paste0("Downloading and annotating dataset for ",input$taxa), detail='This may take several minutes',
value=0,
{
shiny::incProgress(1/10)
Sys.sleep(1)
shiny::incProgress(4/10)
write_tsv(taxaInput(), file)
}
)
}
)
The "grades()" function is my user made function and I can onlye use it to download the file searching for one single word. What I want is to be able to search to put something like this in the input: Word1,Word2,Word3
In a simples R script I used to replace the word for a vector:
group<-c(Word1,Word2,Word3)
But in the shiny app I'm not being able to
Thanks for any response in advance