View Code
1 data look_back; 2 input time temperature; 3 Diff_tmp=dif(temperature); 4 datalines; 5 1 60 6 2 62 7 3 65 8 4 70 9 ; 10 run; 11 proc print data=look_back; 12 run;
运行结果
Obs | time | temperature | Diff_tmp |
---|---|---|---|
1 | 1 | 60 | . |
2 | 2 | 62 | 2 |
3 | 3 | 65 | 3 |
4 | 4 | 70 | 5 |