On Tue, 1 Dec 2009 14:48:04 +1100 Remko Duursma <remkoduur...@gmail.com> 
wrote:
> any(duplicated(c(1,2,2)))

or
anyDuplicated(c(1,2,2))
which is slightly more efficient.

-- 
Karl Ove Hufthammer

______________________________________________
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.

Reply via email to