r - accessing inputs created in renderUI in Shiny -


i trying utilize bit of dynamic gui activity in application on shiny server. application needs variable number of sliders created, depending on data input application. specifically, trying create sliders set value, 1 each unique category in input data table. able read input table , create sliders, using render ui, stuck on how best manipulate variable number of created input values set sliders - how go accessing them (as list, preferably?) appreciate advice or pointers. code snippet below.

output$sliders <- renderui({  # if don't need sliders, return if (input$unequalpts == "no")   return(null) # go panel sliders appear updatetabsetpanel(session, "intabset", selected = "unequal") # number of unique entries field f interest create sliders thedata <- mydata() thefields <- unique(as.character(thedata$shnystr))  return  (     lapply(1:numstrata, function(i) {       sliderinput(inputid = paste0("strata", i), label = paste("strata ", thefields[i]),                 min = 0, max = 100, value = c(0, 100), step = 1)   })   )  }) 

it common use input$foo retrieve value of input widget has id foo. in fact, can use input[['foo']], in case, pass id's input , retrieve values this:

lapply(1:numstrata, function(i) {   input[[paste0("strata", i)]] }) 

Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -