Skip to contents

Categorical app inputs

Usage

pull_cat_cols(df)

Arguments

df

a data.frame or tibble

Value

a named character vector of character and factor column names

Examples

require(palmerpenguins)
#> Loading required package: palmerpenguins
#> Warning: there is no package called ‘palmerpenguins’
require(dplyr)
pull_cat_cols(palmerpenguins::penguins)
#> Error in purrr::map(.x = class, .f = col_class, df = df):  In index: 1.
#> Caused by error in `loadNamespace()`:
#> ! there is no package called ‘palmerpenguins’
pull_cat_cols(dplyr::starwars)
#>    eye_color       gender   hair_color    homeworld         name          sex 
#>  "eye_color"     "gender" "hair_color"  "homeworld"       "name"        "sex" 
#>   skin_color      species 
#> "skin_color"    "species"