I have the following dataframe
group = c("cat", "dog", "horse")
value = c("1", "2", "3")
list = c("siamese,burmese,balinese","corgi,sheltie,collie","arabian,friesian,andalusian" )
df = data.frame(group, value, list)
df
group value list
1 cat 1 siamese,burmese,balinese
2 dog 2 corgi,sheltie,collie
3 horse 3 arabian,friesian,andalusian
and am trying to achieve this:
group value list
1 cat 1 siamese
2 cat 1 burmese
3 cat 1 balinese
4 dog 2 corgi
5 dog 2 sheltie
6 dog 2 collie
7 horse 3 arabian
8 horse 3 friesian
9 horse 3 andalusian
I know how to summarize a dataframe, but I now realize that I don't know how to "unsummarize" one with comma separated strings.