50% off: Unlimited data and AI learning.
State of Data and AI Literacy Report 2025

gaga (version 2.18.0)

buildPatterns: Build a matrix with all possible patterns given a number of groups where samples may belong to.

Description

Creates a matrix indicating which groups are put together under each pattern. The number of possible patterns increases very fast as the number of groups increases. This function provides an easy way to compute all possible patterns. The output of this function is usually used for the patterns parameter of the lmFit function.

Usage

buildPatterns(groups)

Arguments

groups
Character containing the names of the groups at which samples may belong to. If the output of the function is going to be used in fitGG it must match the group levels specified in the groups parameter that will be given to fitGG.

Examples

Run this code
buildPatterns(groups=c('GroupControl','GroupA','GroupB'))

Run the code above in your browser using DataLab