Hi:

I have a dataframe containing comma seperated group of words such as

milk,bread
bread,butter
beer,diaper
beer,diaper
milk,bread
beer,diaper

I want to output the frequency of occurrence of comma separated words
for each row and collapse duplicate rows, to make the output as shown
in the following dataframe:

milk,bread   2
bread,butter 1
beer,diaper  3
milk,bread   2

Thanks for help!

deb

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to