[R] Dealing with Duplicates - How to count instances?

Johannes Graumann johannes_graumann at web.de
Fri Feb 2 16:32:03 CET 2007


Hi there,

given a data.frame 'data' I managed to filter out entries (rows) that are
identical with respect to one column like so:

duplicity <- duplicated(data[column])
data_unique <- subset(data,duplicity!=TRUE)

But I'm trying to extract how many duplicates each of the remaining rows
had.

Can someone please send me down the right path for this?

Joh



More information about the R-help mailing list