0

I have a data frame as follows:

Index|col1|col2|
-----|----|----|
0    |A   |B   |
1    |C   |E   |
2    |A   |D   |

I'd like to add another column col3 such that the output is:

Index|col1|col2|col3|
-----|----|----|----|
0    |A   |B   |A,B |
1    |C   |E   |C,E |
2    |A   |D   |A,D |

How can I do this in RStudio? I'm a beginner so any hint is appreciated. Thanks!

Phil
  • 5,491
  • 3
  • 26
  • 61

0 Answers0