楼主: dxystata
5570 10

如何保留和第一个观测值相同的观测 [推广有奖]

11
firefox29 发表于 2014-10-22 14:35:03
data a;
set a;
if _N_=1 then do;
call symput('first_obs',x);
end;
else do ;
if x^=&first_obs. then delete;
if x not in (“‘””&first_obs.““’”) then delete;       /*字符型的*/
end;
run;

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-29 18:42