input_rule: Add an input rule to a website

View source: R/input_rule.R

input_ruleR Documentation

Add an input rule to a website

Description

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

## Not run: 
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))

## End(Not run)

uva-bi-sdad/community documentation built on Oct. 12, 2023, 1:18 p.m.