R/cell.R
cell.Rd
Creates an array of zeros
cell(n, sz = c(n, n), expandable = FALSE, ...)
a the first dimension (or both, if sz is not passed)
the second dimension (or 1st and 2nd, if not passed)
if TRUE, output is a list (so it can take different lengths)
Other dimensions
An array of zeroes with the dimensions passed on call
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