dummies: Create dummy/indicator variables flexibly and efficiently

> library(dummies)

バージョン: 1.5.6


関数名 概略
dummies-package Create and manipulate dummy variables flexibly and efficiently
dummy Flexible, efficient creation of dummy variables.
get.dummy Get the dummy variable columns from a data frame.
which.dummy Identify which columns are dummy variables on a data frame.

get.dummy

> d <- dummy.data.frame(iris)
> get.dummy(d, "Species") %>% str()
'data.frame':    150 obs. of  3 variables:
 $ Speciessetosa    : int  1 1 1 1 1 1 1 1 1 1 ...
 $ Speciesversicolor: int  0 0 0 0 0 0 0 0 0 0 ...
 $ Speciesvirginica : int  0 0 0 0 0 0 0 0 0 0 ...