RandomWilcoxArray-class: DelayedArray of random Wilcoxon-distributed values

RandomWilcoxArray-classR Documentation

DelayedArray of random Wilcoxon-distributed values

Description

A DelayedArray subclass that performs on-the-fly sampling of Wilcoxon-distributed values.

Usage

RandomWilcoxArraySeed(dim, m, n, chunkdim = NULL, sparse = FALSE)

## S4 method for signature 'RandomWilcoxArraySeed'
DelayedArray(seed)

RandomWilcoxArray(dim, m, n, chunkdim = NULL)

Arguments

dim

Integer vector of positive length, specifying the dimensions of the array.

m, n

Numeric vector used as the argument of the same name in qwilcox. Alternatively, a numeric array-like object with the same dimensions as dim.

chunkdim

Integer vector of length equal to dim, containing the dimensions of each chunk.

sparse

Logical scalar indicating whether the sampled array should be treated as sparse.

seed

A RandomWilcoxArraySeed object.

Value

All constructors return an instance of a RandomWilcoxArray object, containing random draws from a Wilcox distribution with the specified parameters.

Author(s)

Aaron Lun

See Also

The RandomArraySeed class, for details on chunking and the distributional parameters.

Examples

X <- RandomWilcoxArraySeed(c(1e5, 1e5), m=10, n=20)
Y <- DelayedArray(X)
Y

# Fiddling with the distribution parameters:
X2 <- RandomWilcoxArraySeed(c(1e5, 1e5), m=round(runif(1e5, 10, 20)), n=20)
Y2 <- DelayedArray(X2)
Y2

# Using another array as input:
library(Matrix)
m <- round(RandomUnifArray(c(1e5, 1e5), 10, 20))
X3 <- RandomWilcoxArraySeed(c(1e5, 1e5), m=m, n=50)
Y3 <- DelayedArray(X3)
Y3


LTLA/DelayedRandomArray documentation built on July 7, 2024, 12:39 p.m.