In my R shiny app I have a sliderInput
:
sliderInput("number","Specify number :",min = 1,max = 10,value = 2,step = 1)
I want to give some more inputs. The number of these inputs should be equal to the value of sliderInput
(for each number less or equal to the sliderInput there should be another input option or a text message). This results in a number of conditionalPanels
.
Of course, I can define 10 different conditionalPanels
, but I am looking for a loop or something. I tried lapply
:
lapply(1:10,function(i){condition='number>=i',helptext('test-should depend on i')})
Unfortunately, this doesn't work. How can I define the condition depending on the sliderinput?