Learn R Programming

Statomica (version 1.0)

xprnSet: Creates a xprnSet/XprnSet data class structure.

Description

xprnSet and XprnSet create a xprnSet and XprnSet data class structure, respectively. The XprnSet structure contains positive data, which corresponds to measured intensities, abundance levels, etc., whereas the xprnSet structure contains the log of the intensities, log abundance levels, etc. Functions nxprnSet and nXprnSet perform additional checkings on the input data:

- it adds unique names to unnamed input matrices or numeric data,

- it removes columns and rows of data in x and y that do not have any finite element,

- it assures that all column and row names are different by adding a number to duplicated names,

- it assures that row names of input x and row names of input y are identical feature by feature.

Usage

xprnSet(phenoData, exprs, featureData, ...) XprnSet(phenoData, exprs, featureData, ...)
nxprnSet(x, pdata = NULL, fdata = NULL, annot = NULL,...) nXprnSet(x, pdata = NULL, fdata = NULL, annot = NULL,...)

Arguments

exprs, x
A data matrix (or numeric for just 1 feature) with samples in columns and features (genes, proteins,...) in rows.
phenoData, pdata
Optional. An AnnotatedDataFrame or a data.frame with as many rows as the number of samples in the matrix/numeric input. It contains additionally information about the samples. It is equivalent to the pData (phenoData) of the class ExpressionSet in Biobase package.
featureData, fdata
Optional. An AnnotatedDataFrame or a data.frame with as many rows as the number of features in the matrix/numeric input. fdata contains additionally information about the features. It is equivalent to the fData (featureData) of the class ExpressionSet in Biobase package.
annot
Optional. Annotation for the class ExpressionSet from the Biobase package.
...
Optional. Other commands to class ExpressionSet from the Biobase package.

Value

xprnSet and nxprnSet return a xprnSet data class structure. XprnSet and nXprnSet return a XprnSet data class structure.

See Also

See nxprnSetPair,nxprnSet, nXprnSet, xprnSet,XprnSet, xprnSetPair and Bioconductors ExpressionSet class from the Biobase package.

Examples

Run this code
#check results with: class(z);exprs(z);pData(z);fData(z);annotation(z)
nf <- 5; nobs <- 4

x<- matrix(rnorm(nf * nobs), nrow = nf, ncol = nobs)

z1 <- xprnSet(exprs = x)
z2 <- xprnSet(exprs = x, phenoData = data.frame(class = c(1:ncol(x))))
z3 <- XprnSet(exprs = abs(x), annotation = "XprnSet")


z4 <- nxprnSet(x = x)
z5 <- nxprnSet(x = x, pdata = data.frame(class = c(1:ncol(x))))
z6 <- nxprnSet(x = x, pdata = c(rep("A", nobs - 1), rep("B", 1)))
z7 <- nXprnSet(x = abs(x), annot = "XprnSet")


Run the code above in your browser using DataLab