Skip to contents

Create vector of facet columns by type (helper)

Usage

make_facet_vec(df, type)

Arguments

df

a data.frame or tibble

type

type of column to return

Value

vector of facet columns (< 5 levels)

Examples

require(NHANES)
#> Loading required package: NHANES
#> Warning: there is no package called ‘NHANES’
require(dplyr)
facets <- make_facet_vec(
  df = dplyr::select(
    NHANES::NHANES,
    dplyr::where(is.factor)),
  type = "fct")
#> Error in loadNamespace(x): there is no package called ‘NHANES’
facets
#> Error in eval(expr, envir, enclos): object 'facets' not found