Skip to contents

Adds a group of radio-like buttons, where only one can be selected at a time.

Usage

input_buttongroup(label, options, default = 0, display = options,
  id = label, ..., button_class = NULL, variable = NULL,
  dataset = NULL, depends = NULL)

Arguments

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 "datasets" or "variables" to select names of datasets or variables.

default

Which of the options to default to; either its index or value.

display

A display version of the options.

id

Unique id of the element to be created.

...

Additional attributes to set on the element.

button_class

Class name to add to each label (which appears as the button).

variable

The name of a variable from which to get levels (overwritten by depends).

dataset

The name of an included dataset, where variable should be looked for; only applies when there are multiple datasets with the same variable name.

depends

The id of another input on which the options depend; this will take president over dataset and variable, depending on this type of input depends points to.

Value

A character vector of the contents to be added.

See also

For a button to set an input or trigger a function, see input_button.

Examples

if (FALSE) {
input_buttongroup()
}