CoefName: Obtain the name of each coefficient in design matrix.

View source: R/CoefName.R

CoefNameR Documentation

Obtain the name of each coefficient in design matrix.

Description

This functions returns the name of each coefficient in the design, for the convenience of constructing correct contrast for hypothesis testing.

Usage

CoefName(DMR)

Arguments

DMR

A list which is the output from TRESS_DMRfit.

Value

A character vector containing the name of each coefficient in design matrix.

Examples

data("DMR_SixWeekvsTwoWeek")
design = data.frame(time = rep(c("2wk", "6wk"), each = 4),
                    region = rep(rep(c("Cortex", "Hypothalamus"),
                                       each = 2),2)
                    )
model = ~1 + time + region + time*region
DMRfit = CallDMRs.paramEsti(
    counts = DMR_SixWeekvsTwoWeek$Counts,
    sf = DMR_SixWeekvsTwoWeek$sf,
    variable = design,
    model = model
    )
CoefName(DMRfit)

haowulab/TRESS documentation built on Aug. 27, 2022, 7:11 p.m.