R: Allocates an empty vector, matrix or array

allocMatrix {matrixStats} | R Documentation

## Allocates an empty vector, matrix or array

### Description

Allocates an empty vector, matrix or array faster than the corresponding function in R.

### Usage

    allocMatrix(nrow, ncol, value = 0, ...)

    allocVector(length, value = 0, ...)

    allocArray(dim, value = 0, ...)

### Arguments

`value` | A `numeric` scalar that all elements will have as value.
`...` | Not used.
`length, nrow, ncol, dim` | `numeric`s specifying the dimension of the created `vector`, `matrix` or `array`.

### Value

Returns a `vector`, `matrix` and `array` respectively of the same data type as `value`.

### Author(s)

Henrik Bengtsson

### See Also

See also `vector`, `matrix` and `array`.

[Package matrixStats version 0.54.0 Index]