powered by
Ensure that the input has at least two dimensions.
atleast_2d(x)
The same object, but with a "dim" attribute.
"dim"
An appropriate R object supported by dim(), for example a vector, matrix, array, or data.frame.
dim()
x <- 1:10 x atleast_2d(x)
Run the code above in your browser using DataLab