I have a dataset where I want to combine every two rows together. The two row are identical except for B column; the odd rows has letters and the even rows have numbers.
Subject B Gender
1a t m
1b 5 m
2a n m
2b 6 m
... ... ...
... ... ...
The output that I'm looking for is something like:
A B Gender
1a-b t-5 m
2a-b n-6 m
... ... ...
... ... ...
Thanks in advance!