0

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
Ronak Shah
  • 355,584
  • 18
  • 123
  • 178
InVinci
  • 71
  • 8

0 Answers0