楼主: dxystata
5923 10

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

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;

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

客服
GMT+8, 2026-12-5 19:55