data one;
Alex a;
Alex b;
Mary c;
Mary d;
and I want to get data:
data two;
Alex a b;
Mary c d;
How can I do that?
Thanks!

|
楼主: cattii
|
1389
3
Row Combination |
|
已卖:38份资源 高中生 40%
-
|
回帖推荐yongyitian 发表于2楼 查看完整内容 data one;
input name $ Var1 $;
datalines;
Alex a
Alex b
Mary c
Mary d
; run;
proc sort data=one;
by name;
run;
data two three;
set one;
if first.name then output two;
if last.name then output three;
by name;
run;
data four;
merge two three (rename=(var1=var2));
run;
proc print data=four; run;
本帖被以下文库推荐
| ||
|
|
| ||
|
|
|
加好友,备注cda京ICP备16021002号-2 京B2-20170662号
京公网安备 11010802022788号
论坛法律顾问:王进律师
知识产权保护声明
免责及隐私声明


