全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
1264 1
2015-05-08
悬赏 30 个论坛币 已解决
2015-05-08_092811.jpg

最后两列变量(l和u)同时缺失时,如何将其上一行的gender的取值变为缺失?谢谢!

最佳答案

pobel 查看完整内容

data b; set a end=last; if not last then set a(firstobs=2 keep=l u rename=(l=_l u=_u)); if missing(_l) and missing(_u) then call missing(gender); drop _l _u; run;
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2015-5-8 09:37:31
data b;
   set a end=last;
   if not last then set a(firstobs=2 keep=l u rename=(l=_l u=_u));
   if missing(_l) and missing(_u) then call missing(gender);
   drop _l _u;
run;
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群