I have a dataset like this:
vars Year Data
abc12 2014 2630898
abc12 2015 2619763
abc12 2016 2692241
bgh23 2014 2844513
bgh23 2015 2832818
bgh23 2016 3009455
drt98 2014 3166243
drt98 2015 3339208
drt98 2016 3339208
I want to turn it into this:
Year var1 var2 var3
2014 2630898 2844513 3166243
2015 2619763 2619763 3339208
2016 2692241 2832818 3339208
Essentially taking the groups of variables and building a column out of them. How can I do it? Thanks!