Learn R Programming

LTR (version 1.0.0)

apply.LTR: Apply a fitted LTR model to a new dataset

Description

Map a gene-expression matrix into the space encoded by a linear-tranformation of replicates (LTR) fit object.

Usage

apply.LTR(x, model.fit);

Arguments

x
A matrix with samples as columns and genes as rows; must have the same number of rows as the model in model.fit
model.fit
A list with components rownames, intercepts, slopes, r.squared, and residuals. Exactly such a list is generated by fit.LTR

Value

Details

x must have the same number of rows (and in the same order) as the components of model.fit -- no validation of this is performed.

References

The LTR paper, once published

Examples

Run this code
x <- matrix(nrow = 100, ncol = 10, data = rnorm(1000));
y <- matrix(nrow = 100, ncol = 10, data = rnorm(1000));
model.fit <- fit.LTR(x, y);

z <- apply.LTR(
	x = y + matrix(nrow = 100, ncol = 10, data = rnorm(1000) / 10),
	model.fit = model.fit
	);

Run the code above in your browser using DataLab