setInfo<–methods {rCGH} | R Documentation

## 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

    ## S4 replacement method for signature '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.

### Author(s)

Frederic Commo

### See Also

`getInfo`

### Examples

    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"))

[Package rCGH version 1.14.0 Index]