reshapeTip.do open
file:script:do
# | content |
---|---|
1 [+] | // ITSP 6.2 |
3 [+] | clear |
4 [+] | input str8 country str7 tradeflow Yr1990 Yr1991 |
5 [+] | Armenia imports 105 120 |
6 [+] | Armenia exports 90 100 |
7 [+] | Bolivia imports 200 230 |
8 [+] | Bolivia exports 80 115 |
9 [+] | Colombia imports 100 105 |
10 [+] | Colombia exports 70 71 |
⚠ 11 [+] | end |
12 [+] | reshape long Yr , |
14 [+] | rename _j year |
15 [+] | reshape wide Yr , |
// ITSP 6.2 clear input str8 country str7 tradeflow Yr1990 Yr1991 Armenia imports 105 120 Armenia exports 90 100 Bolivia imports 200 230 Bolivia exports 80 115 Colombia imports 100 105 Colombia exports 70 71 end reshape long Yr , i(country tradeflow) rename _j year reshape wide Yr, i(country year) j(tradeflow) string