|
楼主: 一个凯蒂0106
|
2865
3
[SAS] [请教高手]如何按照不同的类别给变量标上序号 |
|
高中生 0%
-
|
回帖推荐data raw;input year month;cards;1998 91998 91998 101998 101999 51999 51999 5 1999 6 1999 6;run;proc sort data=raw;by year month;run;data a;set raw;by year month;retain id;if first.month then id=1;else id+1;run; data result; set a; retain type 0; if id=1 then do; type+1; end; else; drop id; rename type=id;run;
本帖被以下文库推荐
| ||
|
|
| ||
|
|
||
| ||
京ICP备16021002号-2 京B2-20170662号
京公网安备 11010802022788号
论坛法律顾问:王进律师
知识产权保护声明
免责及隐私声明
用户协议


