RandomWeibullArray-class {DelayedRandomArray} | R Documentation

## DelayedArray of random Weibull-distributed values

### Description

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

### Usage

    RandomWeibullArraySeed(dim, shape, scale = 1, chunkdim = NULL)

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

    RandomWeibullArray(dim, shape, scale = 1, chunkdim = NULL)

### Arguments

`dim` | Integer vector of positive length, specifying the dimensions of the array.
`shape, scale` | Numeric vector used as the argument of the same name in `qweibull`. 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.
`seed` | A RandomWeibullArraySeed object.

### Value

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

### Author(s)

Aaron Lun

### See Also

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

### Examples

    X <- RandomWeibullArraySeed(c(1e5, 1e5), shape=10)
    Y <- DelayedArray(X)
    Y

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

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

[Package DelayedRandomArray version 1.2.0 Index]