Returns the size of an object
Arguments
- x
any object with length() or dim().
- verbosity
Integer: Verbosity level. If > 0, print size to console
Value
Integer vector with length equal to the number of dimensions of x, invisibly.
Details
If dim(x) is NULL, returns length(x).
Examples
x <- rnorm(20)
size(x)
#> 20
# 20
x <- matrix(rnorm(100), 20, 5)
size(x)
#> 20 x 5
# 20 5