刚学没多久,对循环还不太熟悉,谢谢各位了!

|
楼主: ccgzl
|
24886
13
sas 变量重命名 |
|
讲师 21%
-
|
回帖推荐有两种方法可以做,一种方法是写宏,另外一种方法是用array
data temp;
input x1-x10;
datalines;
1 2 3 4 5 6 7 8 9 10
11 12 13 14 15 16 17 18 19 20
;
run;
/********** 宏方法 **********************************/
%macro name;
data temp;
set temp;
%do i=1 %to 10;
rename x&i=w&i;
%end;
run;
%mend name;
%name;
proc print data=temp;
run;
/*********** array 方法 ********** ...
本帖被以下文库推荐
| ||
|
|
| ||
|
Let them be hard, but never unjust
|
||
| ||
| ||
| ||
|
be busy living, be busy dying.
|
||
| ||
|
Let them be hard, but never unjust
|
||
加好友,备注cda京ICP备16021002号-2 京B2-20170662号
京公网安备 11010802022788号
论坛法律顾问:王进律师
知识产权保护声明
免责及隐私声明


