[R] Selecting rows regarding the frequency of a factor variable.

From: Ghislain Vieilledent <ghislainv_at_gmail.com>
Date: Thu 30 Jun 2005 - 00:53:51 EST


Hi and sorry to disturb,

I'll try to be as clear as possible:
I want to select rows of a data frame called "Data2.Iso" regarding the frequency of a factor variable called "Variete" that I want ">=4".

I used function table to have the frequency:
> FRAMEVARIETE<-as.data.frame(table(Data2.Iso$Variete))
Then I selected the modalities with a frequency >=4:
> FRAMEVARIETE2<-FRAMEVARIETE[FRAMEVARIETE$Freq>=4,]
> as.character(FRAMEVARIETE2[,"Variete"])

But then, how to select the rows with those modalities? Does anyone can help me?

Thanks!

Ghislain.



R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Jun 30 00:56:28 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:06 EST