Re: [R] How to count rows with a condition

2012-10-17 Thread arun
%in%count(dat2[,1])$x[count(dat2[,1])[2]>5],] #data excluded dat4<-dat2[!dat2[,1]%in%count(dat2[,1])$x[count(dat2[,1])[2]>5],] #data included A.K. - Original Message ----- From: fxen3k To: r-help@r-project.org Cc: Sent: Wednesday, October 17, 2012 9:57 AM Subject: Re: [R] How to

Re: [R] How to count rows with a condition

2012-10-17 Thread William Dunlap
01 2Amos 102 3Amos 103 Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf > Of David Winsemius > Sent: Wednesday, October 17, 2012 1:25 PM > To: fxen3k

Re: [R] How to count rows with a condition

2012-10-17 Thread arun
eB 16.51178 #12  HouseB 15.38984 #13  HouseB 14.37876 #14  HouseC 12.78530 A.K. - Original Message - From: David Winsemius To: fxen3k Cc: r-help@r-project.org Sent: Wednesday, October 17, 2012 4:25 PM Subject: Re: [R] How to count rows with a condition On Oct 17, 2012, at 5:44 AM, fxen3k wrote: >

Re: [R] How to count rows with a condition

2012-10-17 Thread David Winsemius
On Oct 17, 2012, at 5:44 AM, fxen3k wrote: Hi, I have a dataset called "data". There is one row called "ac_name". Some names in this column appear very often, some less. What I want is to filter this dataset with the following condition: Exclude the names, which appear more than five times

Re: [R] How to count rows with a condition

2012-10-17 Thread William Dunlap
r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf > Of fxen3k > Sent: Wednesday, October 17, 2012 5:45 AM > To: r-help@r-project.org > Subject: [R] How to count rows with a condition > > Hi, > > I have a dataset called "data". There is one row called &q

Re: [R] How to count rows with a condition

2012-10-17 Thread fxen3k
Thanks for the first reply. Unfortunately, my list of different ac_names ist pretty long (about 1,000 different names). Is there a way, to sort them, count the quantity of each name and exclude these rows, who exceed a particular limit? -- View this message in context: http://r.789695.n4.nabb

[R] How to count rows with a condition

2012-10-17 Thread fxen3k
Hi, I have a dataset called "data". There is one row called "ac_name". Some names in this column appear very often, some less. What I want is to filter this dataset with the following condition: Exclude the names, which appear more than five times. (example: House A appears 8 times ==> exclude i