Learn R Programming

implicitExpansion (version 0.1.0)

mZeros: Array Creation

Description

Convenience functions that create an array full of identical entries.

Usage

mZeros(...)

mOnes(...)

mTRUE(...)

mFALSE(...)

mNULL(...)

Value

The result of array(XXX, c(...)), where XXX is 0, 1, TRUE, FALSE, or list(), respectively.

Arguments

...

Numbers or numeric vectors, passed to c() and then used as dim argument in a call to array().

Examples

Run this code
mZeros(2, 3)

mOnes(c(1, 2, 3))

mTRUE(c(1, 3), 2)

mFALSE(5)

Run the code above in your browser using DataLab