Skip to contents

Specifies if-then conditions for inputs; that is, when one input is changed, change another based on the entered conditions.

Usage

input_rule(condition, effects)

Arguments

condition

A string representing the condition (e.g., "input_a == 'a'"), with multiple conditions separated by "&". If all conditions are TRUE, all effects will be set.

effects

A list with names corresponding to input IDs, and values of what they should be set to.

Value

The entered condition and effects.

Examples

if (FALSE) {
input_select("input_a", c("a", "b", "c"))
input_slider("input_b", c(0, 10))
input_rule("input_a == 'a' && input_b != 0", list(input_b = 10))
}