EVOLUTION-MANAGER
Edit File: checkboxGroupInput.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Checkbox Group Input Control</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for checkboxGroupInput {shiny}"><tr><td>checkboxGroupInput {shiny}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Checkbox Group Input Control</h2> <h3>Description</h3> <p>Create a group of checkboxes that can be used to toggle multiple choices independently. The server will receive the input as a character vector of the selected values. </p> <h3>Usage</h3> <pre> checkboxGroupInput( inputId, label, choices = NULL, selected = NULL, inline = FALSE, width = NULL, choiceNames = NULL, choiceValues = NULL ) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>inputId</code></td> <td> <p>The <code>input</code> slot that will be used to access the value.</p> </td></tr> <tr valign="top"><td><code>label</code></td> <td> <p>Display label for the control, or <code>NULL</code> for no label.</p> </td></tr> <tr valign="top"><td><code>choices</code></td> <td> <p>List of values to show checkboxes for. If elements of the list are named then that name rather than the value is displayed to the user. If this argument is provided, then <code>choiceNames</code> and <code>choiceValues</code> must not be provided, and vice-versa. The values should be strings; other types (such as logicals and numbers) will be coerced to strings.</p> </td></tr> <tr valign="top"><td><code>selected</code></td> <td> <p>The values that should be initially selected, if any.</p> </td></tr> <tr valign="top"><td><code>inline</code></td> <td> <p>If <code>TRUE</code>, render the choices inline (i.e. horizontally)</p> </td></tr> <tr valign="top"><td><code>width</code></td> <td> <p>The width of the input, e.g. <code>'400px'</code>, or <code>'100%'</code>; see <code><a href="reexports.html">validateCssUnit()</a></code>.</p> </td></tr> <tr valign="top"><td><code>choiceNames, choiceValues</code></td> <td> <p>List of names and values, respectively, that are displayed to the user in the app and correspond to the each choice (for this reason, <code>choiceNames</code> and <code>choiceValues</code> must have the same length). If either of these arguments is provided, then the other <em>must</em> be provided and <code>choices</code> <em>must not</em> be provided. The advantage of using both of these over a named list for <code>choices</code> is that <code>choiceNames</code> allows any type of UI object to be passed through (tag objects, icons, HTML code, ...), instead of just simple text. See Examples.</p> </td></tr> </table> <h3>Value</h3> <p>A list of HTML elements that can be added to a UI definition. </p> <h3>Server value</h3> <p>Character vector of values corresponding to the boxes that are checked. </p> <h3>See Also</h3> <p><code><a href="checkboxInput.html">checkboxInput()</a></code>, <code><a href="updateCheckboxGroupInput.html">updateCheckboxGroupInput()</a></code> </p> <p>Other input elements: <code><a href="actionButton.html">actionButton</a>()</code>, <code><a href="checkboxInput.html">checkboxInput</a>()</code>, <code><a href="dateInput.html">dateInput</a>()</code>, <code><a href="dateRangeInput.html">dateRangeInput</a>()</code>, <code><a href="fileInput.html">fileInput</a>()</code>, <code><a href="numericInput.html">numericInput</a>()</code>, <code><a href="passwordInput.html">passwordInput</a>()</code>, <code><a href="radioButtons.html">radioButtons</a>()</code>, <code><a href="selectInput.html">selectInput</a>()</code>, <code><a href="sliderInput.html">sliderInput</a>()</code>, <code><a href="submitButton.html">submitButton</a>()</code>, <code><a href="textAreaInput.html">textAreaInput</a>()</code>, <code><a href="textInput.html">textInput</a>()</code>, <code><a href="varSelectInput.html">varSelectInput</a>()</code> </p> <h3>Examples</h3> <pre> ## 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, session) { output$data <- renderTable({ mtcars[, c("mpg", input$variable), drop = FALSE] }, rownames = TRUE) } shinyApp(ui, server) ui <- fluidPage( checkboxGroupInput("icons", "Choose icons:", choiceNames = list(icon("calendar"), icon("bed"), icon("cog"), icon("bug")), choiceValues = list("calendar", "bed", "cog", "bug") ), textOutput("txt") ) server <- function(input, output, session) { output$txt <- renderText({ icons <- paste(input$icons, collapse = ", ") paste("You chose", icons) }) } shinyApp(ui, server) } </pre> <hr /><div style="text-align: center;">[Package <em>shiny</em> version 1.5.0 <a href="00Index.html">Index</a>]</div> </body></html>