Skip to contents

This is meant to be used in the console–it generates the code for assigning the elements from a list into a collection of vectors.

Usage

make_ui_inputs(app_data)

Arguments

app_data

dataset for app (data.frame or tibble)

Value

zeallot assignment (%<-%) with input character vector on LHS and list of names by type on the RHS

Examples

require(palmerpenguins)
make_ui_inputs(palmerpenguins::penguins)
#> Error in col_type_list(df = app_data): could not find function "col_type_list"
require(zeallot)
#> Loading required package: zeallot
c(double_vars, integer_vars, factor_vars) %<-%
  list(
    double_vars = c("bill_length_mm", "bill_depth_mm"),
    integer_vars = c("flipper_length_mm", "body_mass_g", "year"),
    factor_vars = c("species", "island", "sex")
  )
double_vars
#> [1] "bill_length_mm" "bill_depth_mm" 
integer_vars
#> [1] "flipper_length_mm" "body_mass_g"       "year"             
factor_vars
#> [1] "species" "island"  "sex"