AllEqual {greenbrown} | R Documentation |
This function is used to check if all values in a vector are equal. It can be used for example to check if a time series contains only 0 or NA values.
AllEqual(x)
x |
numeric, character vector, or time series of type ts |
The function returns TRUE if all values are equal and FALSE if it contains different values.
Matthias Forkel <matthias.forkel@geo.tuwien.ac.at> [aut, cre]
# check if all values are equal in the following vectors: AllEqual(1:10) AllEqual(rep(0, 10)) AllEqual(letters) AllEqual(rep(NA, 10))