extractCol: Function extractCol

Description Usage Arguments Details Value Author(s) Examples

View source: R/extractCol.R

Description

Take a named list of dataframes where each dataframe has the same column names (e.g. a list of topTable dataframes). Extract the named column from each dataframe and return a matrix.

Usage

1
extractCol(dflist, colName, robust = "TRUE")

Arguments

dflist

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

colName

The name of the data column to extract to a matrix

robust

Default = TRUE; TRUE forces use of a joins to merge columns which is more reliable, allows you to combine contrasts from different projects but may nor return items in the same row order as the source table. Setting to false invokes a cbind approach that requires all dataframes to have the same row count and row order but preserves the original row order

Details

The common use case for this is to provide a list of topTable data frames and extract one column from each file to create a matrix of LogRatios or Pvalues.

Technically, this should work as long as the requested colName is present in each dataframe. The default robust = TRUE should be used unless you are absolutely certain each dataframe in the input list has the same row count and row order.

Value

A dataframe containing the extracted columns

Author(s)

John Thompson, jrt@thompsonclan.org

Examples

1
  MyPvalues  = ExtractCol (TopTableList, colName="P.Value")

jrthompson54/DGE.Tools2 documentation built on May 12, 2021, 8:47 p.m.