makeAllContrasts: Make all possible unique pairwise contrasts

Description Usage Arguments Author(s) Examples

View source: R/src_makeAllContrasts.R

Description

Expecting a vector with group names, e.g. 'c("group1", "group2", "group3")' this function will then create all unique pairwise contrasts. By default the output is a matrix/array in the limma-ish style of 'makeContrasts()'. If 'deseq2=TRUE' it returns a named list with DESeq2-ish contrasts that can be used with the contrasts argument of 'results()' and 'lfcShrink()'. The group vector should not contain hyphen!

Usage

1
makeAllContrasts(group, delim = "_vs_", deseq2 = FALSE, name = "group")

Arguments

group

vector with group names

delim

a string to be used as delimiter for the names, Default is "_vs_", e.g. group1_vs_group2

deseq2

logical, whether to return contrasts as a name list in DESeq2-ish style, like c("group", "A", "B")

name

if deseq2, then the "group" name

Author(s)

Alexander Toenges

Examples

1
2
makeAllContrasts(group = c("A", "B", "C"))
makeAllContrasts(group = c("A", "B", "C"), deseq2 = TRUE)

ATpoint/diffanalyseR documentation built on Oct. 8, 2021, 10:11 p.m.