Dear all,

I'm trying to find a a way to remove certain fields belonging to the same
group from a data frame structure.

I have a data frame like this:

 foo v1 v2 v3
       1  1  a
       6  2  a
       3  8  a
       4  4  b
       4  4  b
       2  1  c
       1  6  d

Each row can then be grouped according to the third column: a, b, c, d. Then
I would like to remove all fields that belong to a group with less than X
members, for example less than 3 members, then
the resulting data frame structure would look like:


 foo v1 v2 v3
       1  1   a
       6  2   a
       3  8   a

Is there some simple way to do this in R?

Thanks in advance.
/Oscar

        [[alternative HTML version deleted]]

______________________________________________
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.

Reply via email to