all_same | R Documentation |
Returns a logical as to whether all values within a vector
are identical. This function does NOT compare two independent
vectors. Please use all.equal()
, for such a purpose
combined with isTRUE()
.
all_same(x)
x |
A vector of values. Can be one of the following objects
classes: |
Logical. TRUE
or FALSE
.
Stu Field
isTRUE()
, all.equal()
all_same(1:4) all_same(rep(5, 10)) all_same(rep("A", 10)) all_same(letters) all_same(c(TRUE, TRUE, TRUE)) all_same(c(TRUE, TRUE, FALSE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.