I have some data in a dataframe in the following format:
fish flounder
fish mackerel
fish sole
cats tabby
cats black
Columns are columns in a data frame. Note that there are multiple rows for "fish" and "cats". I need a quick way in R to convert to this:
fish flounder,mackerel,sole
cats tabby,black
Again columns are dataframe columns, but the second column must be a comma-separated string without a final comma.