Description Usage Arguments Details Value Author(s) Examples
View source: R/tidyContrasts.R
Takes a DGEobj or contrast list as input and merges them into one tidy dataframe. A contrast list is simply a list of topTable contrast dataframes. For example, DGEobj::getType(mydgeobj, "topTable") would retrieve a list of contrasts from a DGEobj. The contrast list must be a named list as the contrast names are used during the merge operation.
1 | tidyContrasts(x, rownameColumn = "rownames", includeColumns)
|
x |
A DGEobj or named list of contrast dataframes (required). |
rownameColumn |
Name of the rowname column. If a column by this name does not exist, it is created from the rownames property (rownames_to_column(var=rownameColumn)) |
includeColumns |
A character vector of columns to include in the output (default = colnames of the first contrast) |
The input may or may not have rownames. If supplied rownameColumn does not exist as a colname in the dataframes, it is created from the rownames. In tidy style, the output will have no rownames.
The contrast names will be used as a new column in the tidy output format.
A DF with merged contrast data.
John Thompson, john.thompson@bms.com
1 2 3 4 5 6 | #Get contrasts directly from a DGEobj
MyMergedTidyDF <- tidyContrasts (myDgeObj)
#Assemble a list of contrasts from two DGEobjs; just logFC and conf intervals
myContrasts <- c(getType(DGEobj1, "topTable"), getType(DEobj2, "topTable"))
MyMergedTidyDF <- tidyContrasts (myContrasts, includeColumns = c("logFC", "CI.R", "CI.L"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.