Monday, September 27, 2021

Collapse all values of one string variable to one cell per group

Say I have the following data set:

id var1
1 a
1 b
1 c
2 a
2 d
3 a

Is there a way to collapse this to the following?

id var1
1 a; b; c
2 a; d
3 a

No comments:

Post a Comment