allSame | 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 link{all.equal}
,
for such a purpose combined with isTRUE
.
allSame(x)
x |
A vector of values. Can be one of the following objects
classes: |
Logical. TRUE
or FALSE
.
Stu Field
isTRUE
, all.equal
allSame(1:4) allSame(rep(5, 10)) allSame(rep("A", 10)) allSame(letters) allSame(c(TRUE, TRUE, TRUE)) allSame(c(TRUE, TRUE, FALSE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.