bool_to_binary: New binary numeric column mirroring logical column

Description Usage Arguments Examples

Description

Look at a logical TRUE FALSE column and make new column with binary representation.

Usage

1
bool_to_binary(df, col, remove_bool_col = FALSE)

Arguments

df, col

a data frame and logical TRUE FALSE column to change to binary

Examples

1
iris %>% mutate(Setosa = str_detect(.$Species, "setosa")) %>% bool_to_binary(.,Setosa)

nhemerson/tibbleColumns documentation built on May 29, 2019, 7:18 a.m.