全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
1658 3
2009-06-22
本人是个sas 菜鸟

现在需要删除数据,要求如下:
if data value equal to s,a,c,m or I , then treat as missing(i.e. blank)
if one of data items 4,5,6,12,13,24,25,27,54,58,60 and 199 is missing, the delete,
missing values for all remaining data items are set to zero
这个应该怎么弄阿? 急。。。
请求帮助
二维码

扫码加我 拉你入群

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

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

全部回复
2009-6-22 22:12:52
if your_variable in ('s' 'a' 'c' 'm' 'l') then your_variable='';

if your_v2 in (4 5 6 12 13 24 25 27 54 58 60 199) then delete;

I think it works.
二维码

扫码加我 拉你入群

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

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

2009-6-23 02:03:02
marloneusa 发表于 2009-6-22 22:12
if your_variable in ('s' 'a' 'c' 'm' 'l') then your_variable='';

if your_v2 in (4 5 6 12 13 24 25 27 54 58 60 199) then delete;

I think it works.
then your_variable=''引号中间要再加点什么么?
二维码

扫码加我 拉你入群

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

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

2009-6-23 02:10:11
clearbetty 发表于 2009-6-23 02:03
marloneusa 发表于 2009-6-22 22:12
if your_variable in ('s' 'a' 'c' 'm' 'l') then your_variable='';

if your_v2 in (4 5 6 12 13 24 25 27 54 58 60 199) then delete;

I think it works.
then your_variable=''引号中间要再加点什么么?
SPACE
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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