subtractCoefs: Alternative interface to 'limma::removeBatchEffect()'

View source: R/limma_utils.R

subtractCoefsR Documentation

Alternative interface to limma::removeBatchEffect()

Description

Instead of accepting the batch effects and covariates separately, this function accepts a single design matrix, and an index of which columns of that design matrix represent batch effects.

Usage

subtractCoefs(x, design, coefsToSubtract, ...)

Arguments

x

This has the same meaning as in limma::removeBatchEffect().

design

The full design matrix, including both covariates (whose effects are to be kept) and batch effects (whose effects are to be subtracted out).

coefsToSubtract

An index vector indicating which columns of design should be subtracted out. This can be any vector such that design[,coefsToSubtract] selects the appropriate columns.

...

Additional arguments are passed to limma::removeBatchEffect().

Value

See limma::removeBatchEffect().

Examples


#TODO: Copy from removeBatchEffect


DarwinAwardWinner/rctutils documentation built on July 22, 2022, 5:19 a.m.