
Last chance! 50% off unlimited learning
Sale ends in
Create a set of prettier radio buttons used to select an item from a list.
awesomeRadio(inputId, label, choices, selected = NULL, inline = FALSE,
status = "primary", checkbox = FALSE)
The input
slot that will be used to access the value.
Input label.
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)
The initially selected value
If TRUE, render the choices inline (i.e. horizontally)
Color of the buttons
Checkbox style
A set of radio buttons that can be added to a UI definition.
# NOT RUN {
## Only run examples in interactive R sessions
if (interactive()) {
ui <- fluidPage(
awesomeRadio(inputId = "somevalue", choices = c("A", "B", "C")),
verbatimTextOutput("value")
)
server <- function(input, output) {
output$value <- renderText({ input$somevalue })
}
shinyApp(ui, server)
}
# }
Run the code above in your browser using DataLab