View source: R/input_variable.R
input_variable | R Documentation |
Creates an internal variable (virtual input), which can be used for display logic.
input_variable(id, cases, default = "", display = list())
id |
Name of the variable, which can be referred to by other inputs of outputs. |
cases |
A list of conditions with names specifying conditions, and values to set the variable to
in that condition (e.g., |
default |
The value to set if no condition is |
display |
A list mapping cases names to display names (e.g., |
A version of the resulting variable object.
## Not run:
input_select("input_a", c("a", "b", "c"))
input_variable("vinput_a", list("input_a == c" = "b"), "a")
# vinput_a will be "a" unless input_a is "c"
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.