Learn R Programming

shinyGizmo (version 0.4.2)

pickCheckboxNamesAndLabels: Generate names and labels

Description

Two functions extracting group names and options labels from defined choices.

Usage

pickCheckboxNames(choices)

pickCheckboxLabels(choices)

Value

Named list object defining labels for component checkbox options, or named vector storing labels for each checkbox.

Arguments

choices

linkpickCheckboxInput choices list.

Examples

Run this code
choices_unnamed <- list(
  fruits = c("orange", "apple", "lemon"),
  vegetables = c("potato", "carrot", "broccoli")
)
pickCheckboxNames(choices_unnamed)
pickCheckboxLabels(choices_unnamed)

choices_named <- list(
  fruits = c("Orange" = "orange", "Apple" = "apple", "Lemon" = "lemon"),
  vegetables = c("Potato" = "potato", "Carrot" = "carrot", "Broccoli" = "broccoli")
)
pickCheckboxNames(choices_named)
pickCheckboxLabels(choices_named)

Run the code above in your browser using DataLab