Hi, I want to select elements which have duplicates by are not all duplicated.
Here is what I mean. Suppose I have a two column matrix with columns "Country" and "Pet" Country, Pet ------------------ France, Dog France, Cat France, Dog Canada, Cat Canada, Cat Japan, Dog Japan, Cat Italy, Cat I want to extract all the entries that are duplicated in column "Country" but not ALL duplicated in column "Pet". In this case I want Country, Pet ------------------ France, Dog France, Cat France, Dog Japan, Dog Japan, Cat Notice that I keep France, because not all are duplicated. If there was no entry "France, Cat" then it all of the entries with "France" would be eliminated. Thanks for your help. ______________________________________________ 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.