| setInfo<–methods {rCGH} | R Documentation |
"rCGH"
This function allows the user to store any type of supplementaty information in
an object of class "rCGH".
## S4 replacement method for signature 'rCGH' setInfo(object, item = NULL) <- value
object |
: An object of class |
item |
: character. An item name to store. Default is |
value |
: any. A value to store. |
An object of class "rCGH"
When either item or value is NULL, an error is returned.
Frederic Commo
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"))