distil: Collapse the rows or columns of a matrix using weighted...

Description Usage Arguments Value Examples

View source: R/math.R

Description

This is equivalent to the 'modz' procedure used in collapsing replicates in traditional L1000 data processing. The weight for each replicate is computed as its normalized average correlation to the other replicates in the set.

Usage

1
distil(m, dimension = "col", method = "spearman")

Arguments

m

a numeric matrix where the rows or columns are assumed to be replicates

dimension

the dimension to collapse. either 'row' or 'col'

method

the correlation method to use

Value

a list with the following elements

values

a vector of the collapsed values

correlations

a vector of the pairwise correlations

weights

a vector of the computed weights

Examples

1
2
m <- matrix(rnorm(30), ncol=3)
distil(m)

cmap/cmapR documentation built on Oct. 14, 2021, 12:51 a.m.