topTable.merge: Merge specified topTable df cols

View source: R/topTable.merge.R

topTable.mergeR Documentation

Merge specified topTable df cols

Description

Take a named list of topTable dataframes and cbinds the requested columns from each file. To avoid column name conflicts the names are used as suffixes to the colnames. Although written for topTable data, this should work on any named list of dataframes where each member of the list has the same columns.

Usage

topTable.merge(
  contrastList,
  colNames = c("logFC", "AveExpr", "P.Value", "adj.P.Val"),
  digits = c(2, 2, 4, 3)
)

Arguments

contrastList

A named list of topTable data.frames which all have the same colnames and same row counts. The dataframes in the list should have rownames (geneIDs).

colNames

The list of column names of the data column to extract to a matrix (Default = c("logFC", "AveExpr", "P.Value", "adj.P.Val"))

digits

Number of decimal places for specified columns. Should be same length as colNames. (Default = c(2, 2, 4, 3)). If one value supplied, it is used for all columns.

Value

A matrix containing the extracted columns.

Examples

dgeObj <- readRDS(system.file("exampleObj.RDS", package = "DGEobj"))
contrastList <- DGEobj::getType(dgeObj, type = "topTable")

mergedData <- topTable.merge(contrastList)
colnames(mergedData)


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