getMatrixFromExpressionSet {SpeCond} | R Documentation

## Obtain the expression matrix from an ExpressionSet object

### Description

`getMatrixFromExpressionSet` method returns an matrix of expression values from an ExpressionSet object. It takes into consideration the need of summarizing the samples values by conditions to perform the SpeCond analysis

### Usage

    getMatrixFromExpressionSet(expSet, condition.factor = NULL,
                           condition.method = c("mean", "median","max"))

### Arguments

`expSet` | an ExpressionSet object
`condition.factor` | a factor object of length equal to the number of columns (samples) of the ExpressionSet object specifying which sample(s) belong to which condition (condition.factor levels); can be extracted from the phenoData
`condition.method` | the method (mean, median or max) to summarise the samples by conditions (defined by the condition.factor vector)

### Details

For each level of the condition.factor, the expression values of the ExpressionSet object are computed using the condition.method method. If there is only one sample for a condition the expression value is not changed if condition.factor is NULL, the expression matrix of the ExpressionSet object will simply be extracted using exprs()

### Value

A matrix of expression values of size (number of row in the ExpressionSet * number of level of the condition.factor)

### Author(s)

Florence Cavalli, florence@ebi.ac.uk

### References

Biobase

### See Also

`SpeCond`

### Examples

    library(SpeCond)
    data(expSetSpeCondExample)
    expSetSpeCondExample
    f_Tissues=factor(paste("Tissue_",rep(1:32,each=2),sep=""))
    f_Tissues
    Mexp=getMatrixFromExpressionSet(expSetSpeCondExample,
      condition.factor=f_Tissues,condition.method="mean")
    ## or
    Mexp=getMatrixFromExpressionSet(expSetSpeCondExample,
      condition.factor=expSetSpeCondExample$Tissue,condition.method="mean")

[Package SpeCond version 1.48.0 Index]