define_contrasts: define a contrasts matrix based on a vector of string...

Description Usage Arguments Details

View source: R/define_contrasts.R

Description

There is a slight problem with limma::makeContrasts. 'makeContrasts(contrasts = some_named_vector, levels = design)' does not set the names of the resulting contrasts to match the names in 'some_named_vector'.

Usage

1
define_contrasts(.contrasts, .names, levels)

Arguments

.contrasts

A character vector. All words within the entries should be columns in the design matrix. Any numbers will be treated as numbers. Examples, c("0", "1 + coef1", "coef2 - 2*coef1").

.names

A character vector of the same length as '.contrasts'. These names will be the column names of the returned matrix.

levels

A design matrix. The column names of this matrix will become the row names of the returned matrix

Details

Here we convert a vector of string-based contrast definitions and the names for those contrasts into a contrasts matrix.


russHyde/reeq documentation built on March 10, 2020, 5:36 a.m.