transforming a category tibble into the corresponding dummy variable tibble
Source:R/dummy_var.R
dummy_tbl.Rd
transforming a category tibble into the corresponding dummy variable tibble
Examples
a = tibble::tibble(x = 1:3,y = 4:6)
dummy_tbl(a)
#> # A tibble: 3 × 4
#> x_1 x_2 y_1 y_2
#> <int> <int> <int> <int>
#> 1 1 0 1 0
#> 2 0 1 0 1
#> 3 0 0 0 0