check_contrasts: Check contrasts

Description Usage Arguments Value Note Author(s) Examples

View source: R/check_contrasts.R

Description

Check all possible contrasts used by results_all

Usage

1
check_contrasts(trt, vs = "all", vs2 = TRUE)

Arguments

trt

a vector

vs

either compare all vs. all (default) or a all vs. a specific treatment, or see note.

vs2

position of specific treatment in contrast vector, set FALSE for specific treatment vs all

Value

A vector of contrasts

Note

If you combine factors of interest into a single group following section 3.3 in the DESeq2 vignette, you can set vs = "combined" to limit the comparisons to those within the first group.

Author(s)

Chris Stubben

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
 # check_contrasts( samples$trt)
 trt <- c("heart", "lung", "control")
 check_contrasts(trt)
 data.frame( vs=check_contrasts(trt))
 check_contrasts(trt, vs = "control")
 check_contrasts(trt, vs = "control", vs2=FALSE)
 check_contrasts(factor(trt, levels = trt)  )
 # combine 2 trt groups  (66 possible contrasts, 12 within 1st group).
 trt <- paste( 1:4, rep(c("A", "B", "C"), each=4))
 check_contrasts( trt, vs = "combined")

HuntsmanCancerInstitute/hciR documentation built on March 6, 2020, 12:40 p.m.