Lets say I have a data frame like following:
`df$A` `df$B` `df$C`
BCG 2 4
ACD 5 1
DFA 4 3
ACD 4 2
BCG 1 4
DFA 3 5
BCG 5 4
Assuming that my df$A
is factor, how can I group the data frame rows based on factor level in df$A
. In short, I am expecting the result like following:
`df$A` `df$B` `df$C`
BCG 2 4
BCG 1 4
BCG 5 4
ACD 5 1
ACD 4 2
DFA 4 3
DFA 3 5
Thank you for all the help.