getBaseMeansAndVariances {DESeq} | R Documentation

## Perform row-wise estimates of base-level means and variances for count data.

### Description

This function is called internally by a number of other functions. You will need to call it directly only in very special cases.

### Usage

    getBaseMeansAndVariances(counts, sizeFactors)

### Arguments

`counts` | a matrix of data frame of count data. All the columns of this matrix will be considered as replicates of the same condition.
`sizeFactors` | the size factors of the columns, as estimated e.g. with `estimateSizeFactorsForMatrix`

### Details

This function is kept for backwards compatibility. See the example below for an alternative and more self-explanatory way to get the same data.

### Value

A data frame with one row for each row in 'counts' and two columns:

`baseMean` | The base mean for each row. This is the mean of the counts after they have been divided by the size factors
`comp2` | The base variance for each row. This is the variance of the counts after they have been divided by the size factors

### Author(s)

Simon Anders, sanders@fs.tum.de

### Examples

    cds <- makeExampleCountDataSet()
    cds <- estimateSizeFactors( cds )
    head( getBaseMeansAndVariances( counts(cds), sizeFactors(cds) ) )

    # You can get the same as follows
    head( rowMeans( counts( cds, normalized=TRUE ) ) )
    head( genefilter::rowVars( counts( cds, normalized=TRUE ) ) )

[Package DESeq version 1.36.0 Index]