?duplicated This will identify common locations where duplications occur:
duplicated(a) & duplicated(b) Ravi. ------------------------------------------------------- Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University Ph. (410) 502-2619 email: [email protected] -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Nipesh Bajaj Sent: Wednesday, February 09, 2011 10:12 AM To: [email protected] Subject: [R] A question on Duplicating Hello I am struggling to accomplice an idea which is as follows: I have a vector say: a <- c("a", "b", "c", "a") and another: b <- c("m", "n", "o", "m"). Length of those 2 vectors are essentially be same. Here task is to check the duplicates in the vector 'a' and then to check whether any duplicates are there in the same places of 'b'. If not, flag a FALSE. I above example, it is correct hence TRUE. However in general how can I implement this? Can somebody please help me? Thanks, [[alternative HTML version deleted]] ______________________________________________ [email protected] 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. ______________________________________________ [email protected] 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.

