replicates the functionality of model.matrix, but faster
Replicates the functionality of model.matrix
, but faster
factor_to_indicators(x, ind_ref_mat = NULL) dt_expand_factors(dt)
x | the factor to expand |
---|---|
ind_ref_mat | a matrix used for expansion, if NULL generated automatically |
dt | the dt to expand |