I'd like to acquire the values from certain columns. The columns are different for each row and depend on the values from another column. The example below should speak for itself.
Here's what I have:
id year data.2014 data.2015
1 2014 21 22
2 2015 23 24
Here's what I'd like to have:
id year data.2014 data.2015 data
1 2014 21 22 21
2 2015 23 24 24
Thank you in advance!