Skip to content
Prev 76361 / 398502 Next

Testing if all elements are equal in a vector/matrix

I like this one! It however has the same drawback as 

any(x == x[1])

Patrick Burn's suggestion is also quite nice and original and allows for some 
fuzzyness, like all.equal() does.

I will conclude from this thread that there is no canonical way to do the test 
I want, but many different approaches (something frequent in R). Thanks all 
for the suggestions!

Le 29 Ao??t 2005 17:45, vous avez ??crit??: