addItems {DGEobj} | R Documentation |
Add multiple data items
Description
Add multiple data items
Usage
addItems(dgeObj, itemList, itemTypes, parents, itemAttr, overwrite = FALSE)
Arguments
dgeObj |
A class DGEobj created by function initDGEobj() |
itemList |
A named list of data items to add to DGEobj |
itemTypes |
A list of type values for each item on itemList |
parents |
(optional) A list of parent values for each item on itemList (optional, but highly recommended) |
itemAttr |
(optional) An named list of attributes to add to each item. These attributes will be attached to all items in the call. |
overwrite |
Whether to overwrite a matching data object stored in the itemName slot (default = FALSE) |
Value
A DGEobj
Examples
## Not run:
# NOTE: Requires the edgeR package
# Add normalized counts and log2CPM as additional "assay" items in the DGEobj
dgeObj <- readRDS(system.file("exampleObj.RDS", package = "DGEobj"))
dgeList <- edgeR::calcNormFactors(edgeR::DGEList(dgeObj$counts), method="TMM")
log2cpm <- edgeR::cpm(dgeList, log = TRUE)
dgeObj <- addItems(dgeObj,
itemList = list(newDgelist = dgeList, Log2CPM = log2cpm),
itemTypes = list("assay", "assay"),
parents = list("counts", "newDgelist")
)
inventory(dgeObj)
## End(Not run)
[Package DGEobj version 1.1.2 Index]