Learn R Programming

DGEobj (version 1.1.2)

setAttributes: Set attributes

Description

Set one or more attributes on a DGEobj or on a specific item within a DGEobj.

Usage

setAttributes(dgeObj, attribs)

Arguments

dgeObj

A DGEobj

attribs

A named list of attribute/value pairs

Value

A DGEobj

Details

This function adds attributes without deleting the attributes that are already present. Any named attribute that already exists in the object will be updated. To remove an attribute from an object pass NULL as the attribute value.

Examples

Run this code
# NOT RUN {
    # example DGEobj
    exObj <- readRDS(system.file("miniObj.RDS", package = "DGEobj"))

    # Assign attributes to a DGEobj
    MyAttributes <- list(Platform       = "RNA-Seq",
                         Instrument     = "HiSeq",
                         Vendor         = "Unknown",
                         readType       = "PE",
                         readLength     = 75,
                         strandSpecific = TRUE)
    exObj <- setAttributes(exObj, MyAttributes)

    # Set attributes on an item inside a DGEobj
    MyAttributes <- list(normalized   = FALSE,
                         LowIntFilter = "FPK >5 in >= 1 group")
    exObj[["counts"]] <- setAttributes(exObj[["counts"]], MyAttributes)

# }

Run the code above in your browser using DataLab