search for: myfact

Displaying 2 results from an estimated 2 matches for "myfact".

Did you mean: myfac
2005 Jan 20
5
Subsetting a data frame by a factor, using the level that occurs the most times
I think that title makes sense... I hope it does... I have a data frame, one of the columns of which is a factor. I want the rows of data that correspond to the level in that factor which occurs the most times. I can get a list by doing: by(data,data$pattern,subset) And go through each element of the list counting the rows, to find the maximum.... BUT I can't help thinking there's
2004 Oct 18
2
Recoding factors
I'm having a bit of trouble recoding factors in a fields. I have a field which has the factors Singleton, Twin and Triplet. I want to recode the field to have only the factors Singleton and Multiple. Any advice? Cheers, Neil