Hi, R-help:

I am a new user of R and am very pleased with R's features. Here I have
one question regarding data frame manipulation. I have a data frame look
like this:

    Fruit Condition
1  Orange   Good
2  Orange    Bad
3  Orange   Good
4  Orange   Good
5  Orange    Bad
6   Apple   Good
7   Apple    Bad
8   Apple   Good
9   Apple   Good
10  Apple    Bad
11  Apple   Good
12  Apple    Bad
13  Mango   Good
14  Mango   Good
15  Mango    Bad

and I like to remove fruit group(s) with three or more "Bad" pieces. In
this case, I want to remove Apple group. Is there an easy way to count
the "Good" and "Bad" in each group then remove the ones that meet the
criteria? 

Thanks for your help.

Sean

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to