study_split: divides a data matrix in a list of matrices defined by a...

View source: R/internal_mint.block_helpers.R

study_splitR Documentation

divides a data matrix in a list of matrices defined by a factor

Description

study_split divides a data matrix in a list of matrices defined by a study input.

Usage

study_split(data, study)

Arguments

data

numeric matrix of predictors

study

grouping factor indicating which samples are from the same study

Value

study_split simply returns a list of the same length as the number of levels of study that contains sub-matrices of data.

Author(s)

Florian Rohart, Al J Abadi

See Also

mint.pls, mint.spls, mint.plsda, mint.splsda.

Examples

data(stemcells)
data = stemcells$gene
exp = stemcells$study

data.list = study_split(data, exp)

names(data.list)
lapply(data.list, dim)
table(exp)

mixOmicsTeam/mixOmics documentation built on Dec. 3, 2024, 11:15 p.m.