> I think this does what you want (borrowing from all.equal.numeric): > > all(abs((x - mean(x))) < .Machine$double.eps^0.5) > > with a vector of length 1 million, it took .076 seconds on a fairly old > system.
Hmmm, maybe I want: all.equal(min(x), max(x)) ? Hadley -- Assistant Professor / Dobelman Family Junior Chair Department of Statistics / Rice University http://had.co.nz/ ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.