
Last chance! 50% off unlimited learning
Sale ends in
checkboxGroupInput(inputId, label, choices, selected = NULL, inline = FALSE, width = NULL)
input
slot that will be used to access the value.NULL
for no label.TRUE
, render the choices inline (i.e. horizontally)'400px'
, or '100%'
;
see validateCssUnit
.checkboxInput
, updateCheckboxGroupInput
Other input.elements: actionButton
,
checkboxInput
, dateInput
,
dateRangeInput
, fileInput
,
numericInput
, passwordInput
,
radioButtons
, selectInput
,
sliderInput
, submitButton
,
textAreaInput
, textInput
## Only run examples in interactive R sessions
if (interactive()) {
ui <- fluidPage(
checkboxGroupInput("variable", "Variables to show:",
c("Cylinders" = "cyl",
"Transmission" = "am",
"Gears" = "gear")),
tableOutput("data")
)
server <- function(input, output) {
output$data <- renderTable({
mtcars[, c("mpg", input$variable), drop = FALSE]
}, rownames = TRUE)
}
shinyApp(ui, server)
}
Run the code above in your browser using DataLab