View source: R/has-dimension.r
has_dimension | R Documentation |
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
has_dimension(x)
x |
an R object |
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.