Create multiple shiny selectInput widgets

selectInputs(list = stop("'list' must be provided"), prefix = "",
  minsize = 4, ...)

Arguments

list

a named list object.

prefix

a character string to prepend inputIds.

Details

Create list of shiny ui widgets based on list with label and choices.

See also

https://github.com/rstudio/shiny

Examples

# NOT RUN {
listexample <- list(fruits = c("mango", "apple"),
                    color = c("orange", "green"))

selectInputs(list = listexample, prefix = "dim_")

## generate list from data frame
df <- data.frame(fruits = c("mango", "apple", "mango"),
                 color = c("orange", "green", "red"))

list.df <- apply(df, 2, unique)

selectInputs(list = list.df, prefix = "dim_")
# }