- data a;
- do i=1 to 15;
- a=0.1*i;
- output;
- end;
- drop i;
- run;
- %macro lag;
- %do i=1 %to 4;
- h(&i.)=lag&i.(a);
- %end;
- %mend;
- data b;
- set a;
- array h(4);
- %lag;
- if _n_>5 then aa=sum(a,h(4))/5;
- run;
|
楼主: the_fly_winds
|
1821
6
sas将一行小小的程序改为循环语句。 |
|
已卖:168份资源 博士生 8%
-
|
40论坛币
| |
|
|
| ||||||||||||
|
A man who is frustrated will never stand up.
|
||||||||||||
| ||
| ||
加好友,备注cda京ICP备16021002号-2 京B2-20170662号
京公网安备 11010802022788号
论坛法律顾问:王进律师
知识产权保护声明
免责及隐私声明


