Using R, I would like to compress the rows by Places separated by a , if the Names repeats in the dataframe:
Example ->
Names Places
Andy TX
Andy NY
Andy BE
Cindy AU
Cindy AR
Becky GE
To:
Names Places
Andy TX,NY,BE
Cindy AU,AR
Becky GE
Using R, I would like to compress the rows by Places separated by a , if the Names repeats in the dataframe:
Example ->
Names Places
Andy TX
Andy NY
Andy BE
Cindy AU
Cindy AR
Becky GE
To:
Names Places
Andy TX,NY,BE
Cindy AU,AR
Becky GE