I have this wide dataset structure.
data have;
input ID 7. CO2 Methane N2O HFC;
datalines;
1004377 54 28 54 30
1000112 88 40 72 1
;
And I want this long dataset structure.
data want;
input ID 7. Substance $ Amount;
datalines;
1004377 CO2 54
1004377 Methane 28
1004377 N2O 54
1004377 HFC 30
1000112 CO2 88
1000112 Methane 40
1000112 N2O 72
1000112 HFC 1
;
I'm sure there is an easy way to do this, but can't figure it out. Ideas?