Skip to content
Prev 306567 / 398502 Next

Select Original and Duplicates

Hello,

Try the following.


idx <- duplicated(df) | duplicated(df, fromLast = TRUE)
df[idx, ]

Note that they are returned in their original order in the df.

Hope this helps,

Rui Barradas

Em 28-09-2012 21:11, Adam Gabbert escreveu: