Skip to contents

Create vector of binary columns by type (helper)

Usage

make_binary_vec(df, type)

Arguments

df

a data.frame or tibble

type

type of column to return

Value

vector of binary columns

Examples

require(palmerpenguins)
require(dplyr)
make_binary_vec(
  df = dplyr::select(
    palmerpenguins::penguins,
    dplyr::where(is.factor)
  ),
  type = "fct"
)
#>   sex 
#> "sex"