coerce {convert}R Documentation

Convert Data Objects

Description

Convert between limma, marray and Biobase data objects.

Details

Objects can be converted (coerced) from one class to another using as(object, Class) where object is an object to convert and Class is the name of the class to convert to. The following conversions are provided:
From: To:
RGList marrayRaw
marrayRaw RGList
MAList marrayNorm
marrayNorm MAList
RGList exprSet
MAList exprSet
marrayRaw exprSet
marrayNorm exprSet

Note that RGList and marrayRaw objects are coerced to exprSet in such a way that green and red channel intensities are stored in alternate columns of the exprs slot expression matrix. This means that the resulting exprSet object has twice as many columns as the original object. On the other hand, MAList and marrayNorm are coerced so that the resulting exprs slot contains log-ratios (M-values) and the exprSet object has the same number of columns as the original object. In this case, information on the A-values is lost.

Author(s)

Gordon Smyth

See Also

as in the methods package.

Examples

x <- new("RGList")
y <- as(x,"marrayRaw")

x <- new("marrayRaw")
x@maGf <- matrix(rnorm(5*2),5,2)
x@maRf <- matrix(rnorm(5*2),5,2)
y <- as(x,"RGList")
y <- as(x,"exprSet")

x <- new("MAList")
y <- as(x,"marrayNorm")

x <- new("marrayNorm")
x@maM <- matrix(rnorm(5*2),5,2)
x@maA <- matrix(rnorm(5*2),5,2)
y <- as(x,"MAList")
y <- as(x,"exprSet")

x <- new("MAList")
x$M <- matrix(rnorm(5*2),5,2)
y <- as(x,"exprSet")

[Package convert version 1.1.7 Index]