ResidualMatrixSeed-class | R Documentation |
This is a seed class that powers the DelayedArray machinery underlying the ResidualMatrix.
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.
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).
Aaron Lun
design <- model.matrix(~gl(5, 50))
library(Matrix)
y0 <- rsparsematrix(nrow(design), 200, 0.1)
s <- ResidualMatrixSeed(y0, design)
s
ResidualMatrix(s)
DelayedArray(s)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.