Description Usage Arguments Details Value Author(s) See Also Examples
allequal
tests if two objects have all the same
elements, including whether they have NA
s in the same place.
1 | allequal(x, y)
|
x |
first object to compare |
y |
second object to compare |
Unlike
all(x == y)
, allequal
will return FALSE
if either object is NULL
. Does not
check class types, so allequal
will return TRUE
in some cases
where identical
will return FALSE
(e.g. if two objects are
identical when coerced to the same class). allequal
always
retuns a logical value, so it can be used safely in if
expressions.
Returns TRUE
if x and y exist and all elements are equal, FALSE
if
some elements are unequal.
If there are NA
values, returns TRUE
if is.na(x) == is.na(y) and
all other elements are equal.
Returns FALSE
if is.na(x) != is.na(y).
Retuns FALSE
if x or y (but not both) is NULL
.
Stephanie Gogarten
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.