Create a checkbox that can be used to specify logical values.
Arguments
- inputId
The
inputslot that will be used to access the value.- label
Display label for the control, or
NULLfor no label.- value
Initial value (
TRUEorFALSE).- width
The width of the input, e.g.
'400px', or'100%'; seevalidateCssUnit().
Examples
## Only run examples in interactive R sessions
if (interactive()) {
ui <- fluidPage(
checkboxInput("somevalue", "Some value", FALSE),
verbatimTextOutput("value")
)
server <- function(input, output) {
output$value <- renderText({ input$somevalue })
}
shinyApp(ui, server)
}
