How To Filter a Dataframe based on Category Counts?

Here's a quick example: dat 2, That selects all rows that contain a letter that appears more than twice.

I'll upvote anyway, because your answer is simple and works. – Seth Jul 22 at 22:16 @Seth - I'm waiting to get (back) on a plane, so I started with a comment, thinking I wouldn't have time for more. But then it seemed I had a few minutes, so I wrote the answer...at the moment I predict that I will have a very long day in airports.

:( – joran Jul 22 at 22:18 Works, only caveat in my case (which I didn't state) was that since this is a factor, the boxplot still shows all of the levels along the X axis, instead of just the ones with values. – Kyle Brandt Jul 22 at 22:23 droplevels() should address that. – joran Jul 22 at 22:25 Ah, that can be fixed with drop=T – Kyle Brandt Jul 22 at 22:26.

Here is another approach (probably cleaner) using plyr. Ddply(dat, .(y), subset, length(x) > 2).

I'm a fan of ave for problems like this. Using the example data from @joran's answer: set. Seed(21) dat 2, bar 2) identical(foo,bar) # 1 TRUE.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions