calcMeans: Calculates columnwise "means"

Description Usage Arguments Details Value Author(s) Examples

View source: R/calcMeans.R

Description

Given a numeric matrix and a class variable, this function calculates the sum divided by the sqrt of the number of observations for each class, returning a gene-by-class matrix of summarized values.

Usage

1
calcMeans(x, cls)

Arguments

x

numeric matrix

cls

class variable (must be same length as number of columns of x

Details

This function, of course, does not calculate means, per se. The denominator here is the square root of the number of observations. This is to ensure the resultant summaries have the same variance.

Value

numeric matrix of dimension nrow(x) by length(unique(cls))

Author(s)

Mark Robinson

Examples

1
2
x <- matrix( rnorm(20), nr=5 )
calcMeans(x, cls=c(1,1,2,3))

FIRMAGene documentation built on May 2, 2019, 5:55 p.m.