How can you convert a data.frame into a list?
Input file:
df
a item1
a item2
a item3
b item4
b item5
output file:
output
[[1]]
item1 item2 item3
[[2]]
item4 item5
I found a way to do the opposite. But I cannot figure out how I can convert it into list. Can you help me out?
https://www.r-bloggers.com/r-combining-vectors-or-data-frames-of-unequal-length-into-one-data-frame/