Skip to content
Prev 206042 / 398503 Next

How to get minimum value by group

On Jan 11, 2010, at 7:58 PM, JustinNabble wrote:

            
# with(myframe,   ....) would be a better construction
It's a table, which IS like an array, You want:

 > as.data.frame.table(minimums)
   Var1 Var2 Var3 Freq
1    1    a    x    1
2    2    a    x    9
3    1    b    x    5
4    2    b    x   13
5    1    a    y    3
6    2    a    y   11
7    1    b    y    7
8    2    b    y   15