Changes a column containing multiple values to a matrix of columns containing the dummies corresponding to each value.
colToDummies(col, nameCol, modalities = NULL, keepValue = FALSE)
Matrix containing the dummy columns
input column
name that will be used as a prefix for dummies column name in the output matrix
if a vector is entered, dummies produced will only be the ones corresponding to the values in the "modalities" input column + another one containing all the other modalities.
Logical. If TRUE, puts not "1"s in the dummies output columns but the real values in the "col" column (except if values are non-numeric)