这是因为你所有的
radioButtons
id
,因此它们仅被视为一个UI元素。给你的
ui <- fluidPage(
radioButtons(inputId = "Type",
label = "Review Type:",
choices = c("Type1", "Type2", "Type3"),
inline = T),
conditionalPanel(condition = "input.Type == 'Type1'",
wellPanel(
radioButtons(inputId = "Question1",
label = "do you know R shiny?",
choices = c("Y", "N", "NA"),
selected = "Y",
inline = T)
)
),
conditionalPanel(condition = "input.Type == 'Type2'",
wellPanel(
radioButtons(inputId = "Question1",
label = "do you know Python?",
choices = c("Y", "N", "NA"),
selected = "Y",
inline = T)
)
),
conditionalPanel(condition = "input.Type == 'Type3'",
wellPanel(
radioButtons(inputId = "Question1",
label = "do you know Java?",
choices = c("Y", "N", "NA"),
selected = "Y",
inline = T)
)
)
)