Skip to content
Prev 76346 / 398502 Next

Testing if all elements are equal in a vector/matrix

How about

diff(range(x)) < tolerance

Patrick Burns
patrick at burns-stat.com
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of S Poetry and "A Guide for the Unwilling S User")
Vincent Goulet wrote: