Displaying 1 result from an estimated 1 matches for "5b77c584".
2008 Aug 29
1
Most common level of a factor by
I'm looking for something along the lines of
which ( table ( x ) == max ( table ( x ) ) )
to find the most common level of one factor
by several other factors. For instance, I've got
> X <- data.frame (
+ x = factor ( sample ( c ( "A" , "B" , "C" , "D" ) , 20 , r = T ) )
+ , z1 = factor ( sample ( c ( "Before" ,