我正在尝试创建一个条件面板,在为true时显示一组selectInput变量,在为false时删除其中一个变量。
当我运行下面的代码时,它可以在真实条件下工作,并允许我在选择输入的不同变量之间切换,从而改变了我的无功图。
但是当条件为false且未选中此框时,变量列表是正确的,但是我的图没有变化(即,没有反应)。
ui <- fluidPage(
title = "Post Hoc Grouping Explorer",
fluidRow(
column(3,
h4("Post Hoc Grouping Explorer 2"),
# Input: Checkbox for whether outliers should be included ----
checkboxInput("scaled_input", "Use Scaled Data"),
conditionalPanel(
condition = "input.scaled_input == true",
selectInput("input_var", "Variable:",
c("Dew Point" = "dew",
"Relative Humidity" = "humid",
"Temperature" = "temp",
"Wind Direction" = "windDir",
"Wind Gust" = "windGust",
"Wind Speed" = "windSpd",
"All Scaled Variables" = "all_vars"))
),
conditionalPanel(
condition = "input.scaled_input == false",
selectInput("input_var", "Variable:",
c("Dew Point" = "dew",
"Relative Humidity" = "humid",
"Temperature" = "temp",
"Wind Direction" = "windDir",
"Wind Gust" = "windGust",
"Wind Speed" = "windSpd"))
)
)
),
hr(),
plotOutput("Plot", height = "800px")
)