powered by
Create a select input. Select elements often appear as a dropdown menu and may have one or more selected values, see multiple.
multiple
selectInput(id, choices, values = choices, selected = NULL, ..., multiple = FALSE)
A character string specifying the id of the reactive input.
A character vector specifying the labels of the select input options.
A character vector specifying the values of the select input options, defaults to chocies.
chocies
One of values indicating the default value of the select input, defaults to NULL. If NULL the first value is selected by default.
values
NULL
Additional named arguments passed as HTML attributes to the parent element.
One of TRUE or FALSE, if TRUE multiple values may be selected, otherwise a single value is selected at a time, defaults to FALSE.
TRUE
FALSE
Other inputs: buttonGroupInput, buttonInput, checkboxInput, chipInput, fileInput, formInput, groupInput, listGroupInput, menuInput, navInput, radioInput, rangeInput, sliderInput, textInput
buttonGroupInput
buttonInput
checkboxInput
chipInput
fileInput
formInput
groupInput
listGroupInput
menuInput
navInput
radioInput
rangeInput
sliderInput
textInput
# 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