ResidualMatrixSeed-class: The ResidualMatrixSeed class

ResidualMatrixSeed-classR Documentation

The ResidualMatrixSeed class

Description

This is a seed class that powers the DelayedArray machinery underlying the ResidualMatrix.

Construction

ResidualMatrixSeed(x, design=NULL, keep=NULL) returns a ResidualMatrixSeed object, given:

  • x, a matrix-like object. This can alternatively be a ResidualMatrixSeed, in which case design is ignored.

  • design, a numeric matrix containing the experimental design, to be used for linear model fitting on each column of x. This defaults to an intercept-only matrix.

  • keep, an integer vector specifying the columns of design to not regress out. By default, all columns of design are regressed out.

  • restrict, an integer or logical vector specifying the rows of x to use for model fitting. If NULL, all rows of x are used.

Methods

ResidualMatrixSeed objects are implemented as DelayedMatrix backends. They support standard operations like dim, dimnames and extract_array.

Passing a ResidualMatrixSeed object to the DelayedArray or ResidualMatrix constructors will create a ResidualMatrix (which is what most users should be working with, anyway).

Author(s)

Aaron Lun

Examples

design <- model.matrix(~gl(5, 50))

library(Matrix)
y0 <- rsparsematrix(nrow(design), 200, 0.1)
s <- ResidualMatrixSeed(y0, design)
s

ResidualMatrix(s)

DelayedArray(s)

LTLA/ResidualMatrix documentation built on June 25, 2024, 3:18 a.m.