[R] Is there a function to test if all the elements in a vector are unique

Peng Yu pengyu.ut at gmail.com
Tue Dec 1 04:42:31 CET 2009


length(unique(c(1,2,2)))==length(c(1,2,2))

I use the above test to test if all the elements in a vector are
unique. But I'm wondering if there is a convenient function to do so
in R library.




More information about the R-help mailing list