[R] identify duplicate from more than one column

jour4life jour4life at gmail.com
Sun Nov 13 19:37:05 CET 2011


Thanks Jim and David!

It seems like both were great options. Both of your suggestions of pasting
both IDs together worked well, keeping the pasting as a character is better.
Though, Jim's example was interesting, it gave me the following error:

Error in `$<-.data.frame`(`*tmp*`, "coupleid", value = c(1L, 1L, 2L, 2L,  : 
  replacement has 123586 rows, data has 123631

Since this was a large dataframe, I don't know exactly where the error
occurred. But, it seems like it was detecting missing values in some of the
rows and after checking using the is.na() function, it didn't say that there
were any missing values used (i.e. the new mID or sex). 

What do you guys think may be happening?

Thanks,

Carlos

--
View this message in context: http://r.789695.n4.nabble.com/identify-duplicate-from-more-than-one-column-tp4035888p4037177.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list