[R] Delete observations with a frequency < x

mathijsdevaan mathijsdevaan at gmail.com
Fri Dec 10 01:21:54 CET 2010


Hi,

I have two columns with data (both identifiers - it's an affiliation list)
and I would like to delete the rows in which the observations in the second
column have a frequency < 5 in the entire second column. Example:

1     a
1     b
1     c
2     a
2     b
2     d

Let's say, I would like to delete the rows in which the observation in the
second column has a frequency < 2 in the entire second column. This would
result in:

1     a
1     b
2     a
2     b

How can I do this? Thanks in advance!

Mathijs
-- 
View this message in context: http://r.789695.n4.nabble.com/Delete-observations-with-a-frequency-x-tp3081226p3081226.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list