NaArray-matrixStats | R Documentation |
EXPERIMENTAL!!!
The SparseArray package provides memory-efficient col/row
summarization methods (a.k.a. matrixStats methods) for NaArray
objects, like colSums()
, rowSums()
, colMeans()
,
rowMeans()
, etc...
Note that these are S4 generic functions defined in the MatrixGenerics package, with methods for ordinary matrices defined in the matrixStats package. This man page documents the methods defined for NaArray objects.
IMPORTANT NOTE: This is WORK-IN-PROGRESS! All the col*()
methods
listed below are supported. However, among the row*()
methods,
only rowAnyNAs()
, rowMins()
, rowMaxs()
,
rowRanges()
, rowSums()
, and rowSums2()
are
supported on NaArray objects at the moment.
## N.B.: Showing ONLY the col*() methods (usage of row*() methods is
## the same):
## S4 method for signature 'NaArray'
colAnyNAs(x, rows=NULL, cols=NULL, dims=1, ..., useNames=NA)
## S4 method for signature 'NaArray'
colAnys(x, rows=NULL, cols=NULL, na.rm=FALSE, dims=1, ..., useNames=NA)
## S4 method for signature 'NaArray'
colAlls(x, rows=NULL, cols=NULL, na.rm=FALSE, dims=1, ..., useNames=NA)
## S4 method for signature 'NaArray'
colMins(x, rows=NULL, cols=NULL, na.rm=FALSE, dims=1, ..., useNames=NA)
## S4 method for signature 'NaArray'
colMaxs(x, rows=NULL, cols=NULL, na.rm=FALSE, dims=1, ..., useNames=NA)
## S4 method for signature 'NaArray'
colRanges(x, rows=NULL, cols=NULL, na.rm=FALSE, dims=1, ..., useNames=NA)
## S4 method for signature 'NaArray'
colSums(x, na.rm=FALSE, dims=1)
## S4 method for signature 'NaArray'
colProds(x, rows=NULL, cols=NULL, na.rm=FALSE, dims=1, ..., useNames=NA)
## S4 method for signature 'NaArray'
colMeans(x, na.rm=FALSE, dims=1)
## S4 method for signature 'NaArray'
colSums2(x, rows=NULL, cols=NULL, na.rm=FALSE, dims=1, ..., useNames=NA)
## S4 method for signature 'NaArray'
colMeans2(x, rows=NULL, cols=NULL, na.rm=FALSE, dims=1, ..., useNames=NA)
## S4 method for signature 'NaArray'
colVars(x, rows=NULL, cols=NULL, na.rm=FALSE, center=NULL, dims=1,
..., useNames=NA)
## S4 method for signature 'NaArray'
colSds(x, rows=NULL, cols=NULL, na.rm=FALSE, center=NULL, dims=1,
..., useNames=NA)
x |
An NaMatrix or NaArray object. |
rows , cols , ... |
Not supported. |
na.rm , useNames , center |
See man pages of the corresponding generics in the MatrixGenerics
package (e.g. Note that, unlike the methods for ordinary matrices defined in
the matrixStats package, the |
dims |
See |
These methods are typically used with na.rm=TRUE
when called
on an NaMatrix or NaArray object.
All these methods operate natively on the NaArray internal representation, for maximum efficiency.
Note that more col/row summarization methods might be added in the future.
See man pages of the corresponding generics in the MatrixGenerics
package (e.g. ?MatrixGenerics::colRanges
)
for the value returned by these methods.
Most col*()
methods for NaArray objects are multithreaded.
See set_SparseArray_nthread
for how to control the number
of threads.
NaArray objects.
The man pages of the various generic functions defined
in the MatrixGenerics package e.g.
MatrixGenerics::colVars
etc...
# COMING SOON...
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.