R: fastest way of finding out of all elements of a vector are identical?

There is a question on SO about this: http://stackoverflow.com/questions/4752275/test-for-equality-among-all-elements-of-a-single-vector But I was a bit more curious, so! #test data, large vectors v1 = rep(1234, 1e6) v2 = runif(1e6) #functions to…

Continue ReadingR: fastest way of finding out of all elements of a vector are identical?