createGroupByAttribute: Split elements into groups based on a given column of a...

View source: R/groups.R

createGroupByAttributeR Documentation

Split elements into groups based on a given column of a dataset

Description

Elements are identified by their respective row name.

Usage

createGroupByAttribute(col, dataset)

Arguments

col

Character: column name

dataset

Matrix or data frame: dataset

Value

Named list with each unique value from a given column and respective elements

See Also

Other functions for data grouping: getGeneList(), getSampleFromSubject(), getSubjectFromSample(), groupPerElem(), plotGroupIndependence(), testGroupIndependence()

Examples

df <- data.frame(gender=c("male", "female"),
                 stage=paste("stage", c(1, 3, 1, 4, 2, 3, 2, 2)))
rownames(df) <- paste0("subject-", LETTERS[1:8])
createGroupByAttribute(col="stage", dataset=df)

nuno-agostinho/psichomics documentation built on Feb. 11, 2024, 11:16 p.m.