Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

allocMatrix

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

numerics 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.


matrixStats

Functions that Apply to Rows and Columns of Matrices (and to Vectors)

v0.58.0
Artistic-2.0
Authors
Henrik Bengtsson [aut, cre, cph], Constantin Ahlmann-Eltze [ctb], Hector Corrada Bravo [ctb], Robert Gentleman [ctb], Jan Gleixner [ctb], Peter Hickey [ctb], Ola Hossjer [ctb], Harris Jaffee [ctb], Dongcan Jiang [ctb], Peter Langfelder [ctb], Brian Montgomery [ctb], Hugh Parsonage [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.