Skip to contents

Creates an array of zeros

Usage

cell(n, sz = c(n, n), expandable = FALSE, ...)

Arguments

n

a the first dimension (or both, if sz is not passed)

sz

the second dimension (or 1st and 2nd, if not passed)

expandable

if TRUE, output is a list (so it can take different lengths)

...

Other dimensions

Value

An array of zeroes with the dimensions passed on call

Examples

cell(5)
#>      [,1] [,2] [,3] [,4] [,5]
#> [1,]    0    0    0    0    0
#> [2,]    0    0    0    0    0
#> [3,]    0    0    0    0    0
#> [4,]    0    0    0    0    0
#> [5,]    0    0    0    0    0
cell(5, 2)
#>      [,1] [,2]
#> [1,]    0    0
#> [2,]    0    0
#> [3,]    0    0
#> [4,]    0    0
#> [5,]    0    0