Operate natively on SparseArraySeed objects
Some utilities to operate natively on SparseArraySeed objects.
Mostly for internal use by the DelayedArray package e.g. they
support block processed methods for sparse DelayedArray objects
like sum()
, mean()
, which()
, etc...
## S4 method for signature 'SparseArraySeed' is.na(x) ## S4 method for signature 'SparseArraySeed' is.infinite(x) ## S4 method for signature 'SparseArraySeed' is.nan(x) ## S4 method for signature 'SparseArraySeed' tolower(x) ## S4 method for signature 'SparseArraySeed' toupper(x) ## S4 method for signature 'SparseArraySeed' nchar(x, type="chars", allowNA=FALSE, keepNA=NA) ## S4 method for signature 'SparseArraySeed' anyNA(x, recursive=FALSE) ## S4 method for signature 'SparseArraySeed' which(x, arr.ind=FALSE, useNames=TRUE) ## <>-<>-<> "Summary" group generic <>-<>-<> ## S4 method for signature 'SparseArraySeed' max(x, ..., na.rm=FALSE) ## S4 method for signature 'SparseArraySeed' min(x, ..., na.rm=FALSE) ## S4 method for signature 'SparseArraySeed' range(x, ..., finite=FALSE, na.rm=FALSE) ## S4 method for signature 'SparseArraySeed' sum(x, ..., na.rm=FALSE) ## S4 method for signature 'SparseArraySeed' prod(x, ..., na.rm=FALSE) ## S4 method for signature 'SparseArraySeed' any(x, ..., na.rm=FALSE) ## S4 method for signature 'SparseArraySeed' all(x, ..., na.rm=FALSE) ## <>-<>-<> others <>-<>-<> ## S4 method for signature 'SparseArraySeed' mean(x, na.rm=FALSE)
x |
A SparseArraySeed object. |
type, allowNA, keepNA |
See |
recursive |
See |
arr.ind |
See |
useNames |
Ignored. |
... |
Unsupported. |
na.rm |
|
finite |
|
See corresponding functions in the base package.
SparseArraySeed objects.
## Create a SparseArraySeed object: dim1 <- 5:3 nzindex1 <- Lindex2Mindex(sample(60, 14), 5:3) sas1 <- SparseArraySeed(dim1, nzindex1, nzdata=sample(0:13)) ## Apply native operations: sum(sas1) range(sas1) mean(sas1) ## Sanity checks: stopifnot(identical(sum(as.array(sas1)), sum(sas1))) stopifnot(identical(range(as.array(sas1)), range(sas1))) stopifnot(identical(mean(as.array(sas1)), mean(sas1)))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.