Skip to contents

Prepares factors into their vectors. Each level of a factor is converted to a column, numeric columns are left as is.

Usage

model_RGCCA(data, columns, intercept = FALSE)

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.

See also

fastDummies::dummy_cols()

Examples

block <- model_RGCCA(iris, c("Petal.Width", "Species"))