Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 206278

in R, How to create function to create multiple textinput widgets from list?

$
0
0

using R Shiny, I am trying to create function to create textinput or selectinput widget for all list elements here is a example list

xlist<-c("a","b","c")

here is the textinput function

textInput01 <- function(id, label = id) {textInput(id, label, value = "")}

the ordinary solution and which is not efficient with large lists

xlistCond<-list(textInput01("a"),textInput01("b"),textInput01("c"))

the tried & not working code

xlistCond<-mapply(textInput01,unlist(xlist))


Viewing all articles
Browse latest Browse all 206278

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>