I am looking to transform a data frame df in R from:
col1 col2
X1 A;B
X2 B
X3 C;D
X4 D
into:
col1 col2
X1 A
X1 B
X2 B
X3 C
X3 D
X4 D
I have come up with a complex solution which I have misplaced, and figured there must be a simpler way to do it. Thanks for any pointers.