addPheno-RnBSet-methods: addPheno

Description Usage Arguments Value Author(s) Examples

Description

Adds phenotypic or processing information to the sample annotation table of the given RnBSet object.

Usage

1
2
## S4 method for signature 'RnBSet'
addPheno(object, trait, header)

Arguments

object

RnBSet of interest.

trait

Trait as a non-empty vector or factor. The length of this vector must be equal to the number of samples in object, the i-th element storing the value for the i-th sample. Note that names, if present, are ignored.

header

Trait name given as a one-element character. This is the heading to be used for the sample annotation table. This method fails if such a trait already exists; in other words, if header %in% names(pheno(object)).

Value

The modified dataset as an object of type RnBSet.

Author(s)

Fabian Mueller

Examples

1
2
3
4
5
6
library(RnBeads.hg19)
data(small.example.object)
logger.start(fname=NA)
is.hiPSC <- pheno(rnb.set.example)[, "Sample_Group"]=="hiPSC"
rnb.set.mod <- addPheno(rnb.set.example, is.hiPSC, "is_hiPSC")
pheno(rnb.set.mod)

RnBeads documentation built on March 3, 2021, 2 a.m.