[R] subsetting with condition

kristina p puzarina.k at gmail.com
Thu Jun 2 01:00:56 CEST 2011


Dear R Team, 

I am a new R user and I am currently trying to subset my data under a
special condition. I have went through several pages of the subsetting
section here on the forum, but I was not able to find an answer.

My data is as follows:

 ID                      NAME       MS     Pol. Party 
1                           John       x       F 
2                           Mary       s       S
3                           Katie      x       O
4                           Sarah      p       L
5                           Martin      x      O
6                           Angelika   x      F
7                            Smith      x      O
....

I am intested in only those observations, where there are at least three
members of 1 political party. That is, I need to throw out all cases in the
example above, except for members of party "O". 

Would really appreciate your help.
K

--
View this message in context: http://r.789695.n4.nabble.com/subsetting-with-condition-tp3567193p3567193.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list