Apologies for the simple Q as always. I'm struggling to get pivot wider to do what I want.
I have a tab delimited dataset like this:
ID filepath
ID1 /tmp/ID1_1.txt
ID1 /tmp/ID1_2.txt
ID2 /tmp/ID2_1.txt
ID2 /tmp/ID2_2.txt
ID3 /tmp/ID3_1.txt
ID3 /tmp/ID3_2.txt
and I want to transform it to something like this:
ID filepath_1 filepath_2
ID1 /tmp/ID1_1.txt /tmp/ID1_2.txt
ID2 /tmp/ID2_1.txt /tmp/ID2_2.txt
ID3 /tmp/ID3_1.txt /tmp/ID3_2.txt
I figure pivot wider is the way to go, but it's not behaving..
Would appreciate some guidance!