Learn R Programming

ruv (version 0.9.7.1)

collapse.replicates: Collapse Replicates

Description

This function is intended for use in conjunction with RUVIII, specifically when using the average=TRUE option. When using the average=TRUE option, the adjusted data matrix has only one row for each set of replicates. In other words, each set of replicate rows in the orginal data matrix is "collapsed" into a single row in the adjusted data matrix. This function similarly collapses the rows of a dataframe of covariates. Only covariates that are constant within each set of replicates are retained.

Usage

collapse.replicates(df, M)

Value

A sub-dataframe of df.

Arguments

df

A dataframe.

M

The replicate structure. See RUVIII for details.

Author

Johann Gagnon-Bartsch johanngb@umich.edu

See Also

RUVIII