View source: R/input_checkbox.R
input_checkbox | R Documentation |
Adds a set of checkbox, radio buttons, or switches to a website.
input_checkbox(label, options, default = "all", display = options,
id = label, ..., note = NULL, variable = NULL, dataset = NULL,
depends = NULL, multi = TRUE, as.switch = FALSE)
label |
Label of the input for the user. |
options |
A vector of options, the name of a variable from which to pull levels, or either |
default |
A vector of items to check by default (or "all" or "none") if |
display |
A display version of the options. |
id |
Unique id of the element to be created. |
... |
Additional attributes to set on the element. |
note |
Text to display as a tooltip for the input. |
variable |
The name of a variable from which to get levels (overwritten by |
dataset |
The name of an included dataset, where |
depends |
The id of another input on which the options depend; this will take president over |
multi |
Logical; if |
as.switch |
Logical; if |
A character vector of the contents to be added.
For a single switch or checkbox, use input_switch
.
## Not run:
input_checkbox("Label", c("a", "b", "c"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.