I was wondering if it is possible to add more than one condition in conditionalPanel
in shiny. This is an example:
conditionalPanel(condition = "input.SELECT == 1",
#Slider
sliderInput("D_FLAG", "Parameter X:",
min = 0.001, max = 3, value = 1.38, step = 0.1))
I want to add another condition (other than input.SELECT==1
). I have tried this but it didn't work.
conditionalPanel(condition = c("input.SELECT == 1","input.FED==2"),
#Slider
sliderInput("D_FLAG", "Parameter X:",
min = 0.001, max = 3, value = 1.38, step = 0.1))
but it didn't work. I would appreciate if somebody could have some input on the right way for including multiple conditions in the conditionalPanel
above.
You can have as complicated of a statement as you want as long as it evaluates to TRUE or FALSE at the end. You probably want to combine your two conditions either with AND &&
or OR ||
, like this (for OR):
"input.SELECT == 1 || input.FED == 2"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With