Description Usage Arguments Examples
has_dimension
and has_dim
test if an object
has dimension (i.e. dim
)
lacks_dimension
and lacks_dim
test if an
object lacks dimension
1 |
x |
an R object |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | m = matrix(1:12, 4, 3)
a = as.array(letters)
has_dim(m) # TRUE
has_dimension(a)
has_dimension(iris) # TRUE
has_dim(matrix(1:10, 10, 1)) # TRUE
has_dim(matrix(1:10, 1, 10)) # TRUE
has_dim(1) # FALSE
lacks_dim(1) # TRUE
has_dim(1:10) # FALSE
has_dimension("dimension") # FALSE
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.