Construct_con: Construct Contrast Matrix

View source: R/generateRef_limma.R

Construct_conR Documentation

Construct Contrast Matrix

Description

Creates a contrast matrix for differential analysis, where each phenotype level is contrasted against all other levels combined.

Usage

Construct_con(pheno)

Arguments

pheno

Factor with different levels representing groups to contrast.

Value

Square matrix with dimensions equal to the number of levels in 'pheno'. Each row represents a contrast where the corresponding level is compared against the average of others.

Examples

pheno <- factor(c("A", "B", "C", "D"))
contrast_matrix <- Construct_con(pheno)
print(contrast_matrix)

IOBR documentation built on May 30, 2026, 5:07 p.m.