Hi everybody !!
My app needs to have sliderInputs but the number of these sliders are depending on the operator.
To solve the problem I coded :
n= 10
library("shiny")
runApp(list(
ui = fluidPage(
titlePanel("title panel"),
sidebarLayout(
sidebarPanel("sidebar panel",
uiOutput('SAMPLEselection1'),
for(p in 2:(n-1)){
eval(parse(text= paste("uiOutput(","\'","SAMPLEselection",p,"\'","),",sep="")))
}
uiOutput('SAMPLEselection10')
),
mainPanel("main panel"))
)
,
server = function(input, output, session) {
for(i in 1:n){
eval(parse(text = paste("output$SAMPLEselection",i, "= renderUI({","\n","selectInput(","\"","SampledirSelection",i,"\"",",","\"", "Choose the Sample to analyze","\"", ",c(1,2,3))","\n","})",sep ="")))
}
}
))
But it doesn't work.
I don't why ??!! Perhaps it is not possible to have a "for" in the ui ?
Thanks in advance for your answers.
Charlotte