Learn R Programming

yonder (version 0.1.0)

selectInput: Select input

Description

Create a select input. Select elements often appear as a dropdown menu and may have one or more selected values, see multiple.

Usage

selectInput(id, choices, values = choices, selected = NULL, ...,
  multiple = FALSE)

Arguments

id

A character string specifying the id of the reactive input.

choices

A character vector specifying the labels of the select input options.

values

A character vector specifying the values of the select input options, defaults to chocies.

selected

One of values indicating the default value of the select input, defaults to NULL. If NULL the first value is selected by default.

...

Additional named arguments passed as HTML attributes to the parent element.

multiple

One of TRUE or FALSE, if TRUE multiple values may be selected, otherwise a single value is selected at a time, defaults to FALSE.

See Also

Other inputs: buttonGroupInput, buttonInput, checkboxInput, chipInput, fileInput, formInput, groupInput, listGroupInput, menuInput, navInput, radioInput, rangeInput, sliderInput, textInput

Examples

Run this code
# NOT RUN {
### Getting started

selectInput(
  id = NULL,
  choices = c(
    "Choose one",
    "Choice 1",
    "Choice 2",
    "Choice 3"
  ),
  values = list(NULL, 1, 2, 3)
)

# }

Run the code above in your browser using DataLab