
Last chance! 50% off unlimited learning
Sale ends in
R's regular dim
function returns NULL for a vector. It is useful to have this function that treats a vector similarly to a matrix or array. Works in R and NIMBLE. In NIMBLE dim
is identical to nimDim
, not to R's dim
nimDim(obj)
objects for which the sizes are requested
a vector of sizes in each dimension
# NOT RUN {
x <- rnorm(4)
dim(x)
nimDim(x)
y <- matrix(x, nrow = 2)
dim(y)
nimDim(y)
# }
Run the code above in your browser using DataLab