Hello,
I need to take a list of input from the user. The user should be able to input the elements of the list one at a time, and they should be collected one at a time and saved in a list. I guess, the user presses enter after each input an the input box is refreshed, ready to take another input. This would be the equivalent using R code:
while (!done) {
cat("Type in one at a time, hit Return after each one:\n")
i<- 1
while (i <= length(tags)){
x<- readline(prompt=paste("Current:",tags[i],"; NEW: "))
if (nchar(x)==0) {
cat("You must enter a new name.\n")
next
}
new_tags[i]<- x
i=i+1
}
I know how to use the Shiny's text input component. Please see below:
textInput("tagname", label = h4("Enter a name to designate this combined set..."), value = "Enter"),
But I do not know how to use it so that the user keeps entering names, one at a time and refreshing the input box to make it ready to take in the next input. Could you please point me to any documentation about this?
Thank you