Learn R Programming

RnBeads (version 1.4.0)

get.covariates.sva: get.covariates.sva

Description

Retrieves an NxK table of Surrogate variables stored in an RnBSet for a given target variable

Usage

get.covariates.sva(rnb.set, target)

Arguments

rnb.set
RnBSet object
target
target variable. Must be in pheno(rnb.set) and belong to target variables for which the SVs have already been computed and stored in the RnBSet.

Value

an NxK table of K Surrogate variables stored for N samples of the rnb.set. NULL if the components have not been computed or added to rnb.set.

Examples

Run this code

library(RnBeads.hg19)
data(small.example.object)
logger.start(fname=NA)
sva.obj <- rnb.execute.sva(rnb.set.example,c("Sample_Group","Treatment"),numSVmethod="be")
sva.obj$sva.performed
sva.obj$num.components
rnb.set.mod <- set.covariates.sva(rnb.set.example, sva.obj)
get.covariates.sva(rnb.set.mod,"Sample_Group")

Run the code above in your browser using DataLab