pickCheckboxNamesAndLabels.Rd
Two functions extracting group names and options labels from defined choices.
pickCheckboxNames(choices)
pickCheckboxLabels(choices)
linkpickCheckboxInput choices list.
Named list object defining labels for component checkbox options, or named vector storing labels for each checkbox.
choices_unnamed <- list(
fruits = c("orange", "apple", "lemon"),
vegetables = c("potato", "carrot", "broccoli")
)
pickCheckboxNames(choices_unnamed)
#> $fruits
#> [1] "orange" "apple" "lemon"
#>
#> $vegetables
#> [1] "potato" "carrot" "broccoli"
#>
pickCheckboxLabels(choices_unnamed)
#> fruits vegetables
#> "fruits" "vegetables"
choices_named <- list(
fruits = c("Orange" = "orange", "Apple" = "apple", "Lemon" = "lemon"),
vegetables = c("Potato" = "potato", "Carrot" = "carrot", "Broccoli" = "broccoli")
)
pickCheckboxNames(choices_named)
#> $fruits
#> [1] "Orange" "Apple" "Lemon"
#>
#> $vegetables
#> [1] "Potato" "Carrot" "Broccoli"
#>
pickCheckboxLabels(choices_named)
#> fruits vegetables
#> "fruits" "vegetables"