Learn R Programming

shiny (version 0.9.0)

radioButtons: Create radio buttons

Description

Create a set of radio buttons used to select an item from a list.

Usage

radioButtons(inputId, label, choices, selected = NULL)

Arguments

inputId
Input variable to assign the control's value to
label
Display label for the control
choices
List of values to select from (if elements of the list are named then that name rather than the value is displayed to the user)
selected
The initially selected value (if not specified then defaults to the first value)

Value

  • A set of radio buttons that can be added to a UI definition.

See Also

updateRadioButtons

Other input.elements: actionButton; animationOptions, sliderInput; checkboxGroupInput; checkboxInput; dateInput; dateRangeInput; fileInput; numericInput; selectInput, selectizeInput; submitButton; textInput

Examples

Run this code
radioButtons("dist", "Distribution type:",
             c("Normal" = "norm",
               "Uniform" = "unif",
               "Log-normal" = "lnorm",
               "Exponential" = "exp"))

Run the code above in your browser using DataLab