df <- data.frame(A=1:3, B=3:1, C=factor(c("foo","bar","foo")), row.names = c("one", "two", "three"))
## Should give the following
## list(one=list(A=1, B=3, C="foo"),
## two=list(A=2, B=2, C="bar"),
## three=list(A=3, B=1, C="foo"))
data.frame.to.list(df)
Run the code above in your browser using DataLab