rCGH (version 1.2.2)

setInfo<--methods: Adding Information In An Object Of Class "rCGH"

Description

This function allows the user to store any type of supplementaty information in an object of class "rCGH".

Usage

## S3 method for class 'rCGH':
setInfo(object, item = NULL) <- value

Arguments

object
: An object of class "rCGH"
item
: character. An item name to store. Default is NULL.
value
: any. A value to store.

Value

  • An object of class "rCGH"

Warning

When either item or value is NULL, an error is returned.

See Also

getInfo

Examples

Run this code
filePath <- system.file("extdata", "Affy_cytoScan.cyhd.CN5.CNCHP.txt.bz2",
    package = "rCGH")
cgh <- readAffyCytoScan(filePath, sampleName = "AffyScHD")

# When supplementary information is added,
# numerical, logical, or strings are supported
setInfo(cgh, "someItem1") <- 35
setInfo(cgh, "someItem2") <- TRUE
setInfo(cgh, "someItem3") <- "someComment"
getInfo(cgh)

# or to get back specific items
getInfo(cgh, c("someItem1", "someItem3"))

Run the code above in your browser using DataLab