Returns the number of dimensions, or 1 for an atomic vector.

ndim(x)

Arguments

x

a matrix or atomic vector