
Last chance! 50% off unlimited learning
Sale ends in
model.matrix
create_model_matrix(dat, id = c(), matrix_out = TRUE, parallel = FALSE)
TRUE
), suitable
for input into many modelling functions, or should the result be
a tbl (FALSE
), suitible for inspection and further analysis?
Default TRUE
TRUE
, parallel
foreach
is used to compute on each
variable. Must register a parallel backend first. Default
FALSE
.factor
. Contrary
to how it may sound, this actually offers the user greater flexibility, for
two reasons: it allows you to keep character type variables intact, and it
forces you to think about the levels of each factor variable rather than
picking them straight from the input data
x <- simple_bin(iris,bins = 3)
create_model_matrix(x)
create_model_matrix(x,matrix_out = FALSE)
Run the code above in your browser using DataLab