Ghislain Vieilledent
2005-Jun-29 14:53 UTC
[R] Selecting rows regarding the frequency of a factor variable.
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.