Gets the dimension of the object similar to what dim() does,
but instead of NULL it will return the length of a vector.
If a function is passed, NULL is returned.
Usage
## S3 method for class 'default':
dimension(object, ...)
Arguments
object
The object for which the dimension should be obtained.