Learn R Programming

MKmisc (version 1.9)

repMeans: Compute mean of replicated spots

Description

Compute mean of replicated spots where additionally spot flags may incorporated.

Usage

repMeans(x, flags, use.flags = NULL, ndups, spacing, method, ...)

Value

LIST with components

exprs

mean of expression values

flags

flags for mean expression values

Arguments

x

matrix or data.frame of expression values

flags

matrix or data.frame of spot flags; must have same dimension as x

use.flags

should flags be included and in which way; cf. section details

ndups

integer, number of replicates on chip. The number of rows of x must be divisible by ndups

spacing

the spacing between the rows of 'x' corresponding to replicated spots, spacing = 1 for consecutive spots; cf. function unwrapdups in package "limma"

method

function to aggregate the replicated spots. If missing, the mean is used.

...

optional arguments to method.

Author

Matthias Kohl Matthias.Kohl@stamats.de

Details

The incorporation of spot flags is controlled via argument use.flags.

NULL: flags are not used; minimum flag value of replicated spots is returned

"max": only spots with flag value equal to the maximum flag value of replicated spots are used

"median": only spots with flag values larger or equal to median of replicated spots are used

"mean": only spots with flag values larger or equal to mean of replicated spots are used

See Also

unwrapdups

Examples

Run this code
## only a dummy example
M <- matrix(rnorm(1000), ncol = 10)
FL <- matrix(rpois(1000, lambda = 10), ncol = 10) # only for this example
res <- repMeans(x = M, flags = FL, use.flags = "max", ndups = 5, spacing = 20)

Run the code above in your browser using DataLab