Description Usage Arguments See Also Examples
Statistical functions on DelayedArray objects.
All these functions are implemented as delayed operations.
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 | ## --- The Normal Distribution ----- ##
## S4 method for signature 'DelayedArray'
dnorm(x, mean=0, sd=1, log=FALSE)
## S4 method for signature 'DelayedArray'
pnorm(q, mean=0, sd=1, lower.tail=TRUE, log.p=FALSE)
## S4 method for signature 'DelayedArray'
qnorm(p, mean=0, sd=1, lower.tail=TRUE, log.p=FALSE)
## --- The Binomial Distribution --- ##
## S4 method for signature 'DelayedArray'
dbinom(x, size, prob, log=FALSE)
## S4 method for signature 'DelayedArray'
pbinom(q, size, prob, lower.tail=TRUE, log.p=FALSE)
## S4 method for signature 'DelayedArray'
qbinom(p, size, prob, lower.tail=TRUE, log.p=FALSE)
## --- The Poisson Distribution ---- ##
## S4 method for signature 'DelayedArray'
dpois(x, lambda, log=FALSE)
## S4 method for signature 'DelayedArray'
ppois(q, lambda, lower.tail=TRUE, log.p=FALSE)
## S4 method for signature 'DelayedArray'
qpois(p, lambda, lower.tail=TRUE, log.p=FALSE)
## --- The Logistic Distribution --- ##
## S4 method for signature 'DelayedArray'
dlogis(x, location=0, scale=1, log=FALSE)
## S4 method for signature 'DelayedArray'
plogis(q, location=0, scale=1, lower.tail=TRUE, log.p=FALSE)
## S4 method for signature 'DelayedArray'
qlogis(p, location=0, scale=1, lower.tail=TRUE, log.p=FALSE)
|
x, q, p |
A DelayedArray object. |
mean, sd, log, lower.tail, log.p, size, prob, lambda, location, scale |
See |
dnorm
, dbinom
,
dpois
, and dlogis
in the stats package for the corresponding operations
on ordinary arrays or matrices.
DelayedMatrix-stats for DelayedMatrix row/col summarization.
DelayedArray objects.
HDF5Array objects in the HDF5Array package.
array objects in base R.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | a <- array(4 * runif(1500000), dim=c(10000, 30, 5))
A <- DelayedArray(a)
A
A2 <- dnorm(A + 1)[ , , -3] # very fast! (operations are delayed)
A2
a2 <- as.array(A2) # "realize" 'A2' in memory (as an ordinary
# array)
DelayedArray(a2) == A2 # DelayedArray object of type "logical"
stopifnot(all(DelayedArray(a2) == A2))
library(HDF5Array)
A3 <- as(A2, "HDF5Array") # "realize" 'A2' on disk (as an HDF5Array
# object)
A3 == A2 # DelayedArray object of type "logical"
stopifnot(all(A3 == A2))
## See '?DelayedArray' for general information about DelayedArray objects
## and their "realization".
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.