lst = data.frame( a=c(1,1,2,2), b=c(1,2,1,1)) print(lst) print(split(lst, lst$a))
Standard input is empty
a b 1 1 1 2 1 2 3 2 1 4 2 1 $`1` a b 1 1 1 2 1 2 $`2` a b 3 2 1 4 2 1
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!