Learn R Programming

edge (version 2.4.2)

deSet: Create a deSet object from an ExpressionSet

Description

Creates a deSet object that extends the ExpressionSet object.

Usage

deSet(object, full.model, null.model, individual = NULL)

## S3 method for class 'ExpressionSet': deSet(object, full.model, null.model, individual = NULL)

Arguments

object
S4 object: ExpressionSet
full.model
formula: full model containing the both the adjustment and the biological variables for the experiment.
null.model
formula: null model containing the adjustment variables for the experiment.
individual
factor: information on repeated samples in experiment.

Value

  • deSet object

See Also

deSet, odp and lrt

Examples

Run this code
# import data
library(splines)
data(kidney)
age <- kidney$age
sex <- kidney$sex
kidexpr <- kidney$kidexpr
cov <- data.frame(sex = sex, age = age)
pDat <- as(cov, "AnnotatedDataFrame")
exp_set <- ExpressionSet(assayData = kidexpr, phenoData = pDat)

# create models
null_model <- ~sex
full_model <- ~sex + ns(age, df = 4)

# create deSet object from data
de_obj <- deSet(exp_set, null.model = null_model,
full.model = full_model)

# optionally add individuals to experiment, in this case there are 36
# individuals that were sampled twice
indSamples <- as.factor(rep(1:36, each = 2))
de_obj <- deSet(exp_set, null.model = null_model,
full.model = full_model, ind = indSamples)
summary(de_obj)

Run the code above in your browser using DataLab