lengths_match | R Documentation |
Checks whether the nth dimension lengths match for the given objects.
lengths_match(..., dimension = 1)
... |
(objects) The objects to test. |
dimension |
(num scalar) The dimension to test. |
Vectors are treated as 1-dimensional.
Logical scalar.
lengths_match(1:4, 5:8) #same lengths
lengths_match(iris, iris[1:2]) #same nrow
lengths_match(iris, iris[1:2], dimension = 2) #different ncol
lengths_match(iris, 1:3, dimension = 2) #incompatible objects
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.