rsqCalc: Calculate R-squared for each gene fit

View source: R/rsqCalc.R

rsqCalcR Documentation

Calculate R-squared for each gene fit

Description

Takes a Log2CPM numeric matrix and MArrayLM fit object from limma's lmFit() and calculates R-squared for each gene fit.

Usage

rsqCalc(normMatrix, fit)

Arguments

normMatrix

A normalized log2cpm matrix

fit

A MArrayLM object from limma's lmFit()

Value

A vector of R-squared values for each gene fit.

Examples

## Not run: 
   # NOTE: Requires the edgeR package

   dgeObj    <- readRDS(system.file("exampleObj.RDS", package = "DGEobj"))
   log2cpm   <- convertCounts(dgeObj$counts, unit = "cpm", log=TRUE, normalize = "tmm")
   fitObject <- dgeObj$ReplicateGroupDesign_fit
   rsq       <- rsqCalc (log2cpm, fitObject)

## End(Not run)


DGEobj.utils documentation built on May 20, 2022, 1:08 a.m.