Prepares factors into their vectors. Each level of a factor is converted to a column, numeric columns are left as is.
Arguments
- data
A data.frame with the information about the samples
- columns
The name of the columns to be used to build the matrix
- intercept
A logical value if you want one column with all 1 or not.
Value
A matrix with each factor is decomposed in as much columns as factors has minus 1 and with the numeric values as they were.
Examples
block <- model_RGCCA(iris, c("Petal.Width", "Species"))