Description Usage Arguments Value See Also Examples
View source: R/input-checkbox.R
Create a checkbox that can be used to specify logical values.
1 | checkboxInput(inputId, label, value = FALSE, width = NULL)
|
inputId |
The |
label |
Display label for the control, or |
value |
Initial value ( |
width |
The width of the input, e.g. |
A checkbox control that can be added to a UI definition.
checkboxGroupInput
, updateCheckboxInput
Other input.elements: actionButton
,
checkboxGroupInput
,
dateInput
, dateRangeInput
,
fileInput
, numericInput
,
passwordInput
, radioButtons
,
selectInput
, sliderInput
,
submitButton
, textAreaInput
,
textInput
1 2 3 4 5 6 7 8 9 10 11 12 | ## 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)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.