Description Usage Arguments Value See Also Examples
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...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | ## 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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## 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)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.