全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
2307 2
2012-07-15
最近看到sas online tutor上的一段程序
data work.getobs5(drop=obsnum);        obsnum=5;        set company.usa(keep=manager payroll) point=obsnum;        output;        stop;     run;     proc print data=work.getobs5 noobs;     run;请问各位高手:为啥要drop掉obsnum?obsnum会出现在getobs5这个数据集中吗?我试着运行了一下这个程序,sas提示错误:WARNING: The variable obsnum in the DROP, KEEP, or RENAME list has never been referenced.
请各位帮小弟解决一下~~不甚感激!!!!!

二维码

扫码加我 拉你入群

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

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

全部回复
2012-7-15 07:36:57
Point= variable 不会输出到数据集中,所以不用DROP。

SAS Help:
Tip: You must supply the values of the POINT= variable. For example, you can use the POINT= variable as the index variable in some form of the DO statement.
Tip: The POINT= variable is available anywhere in the DATA step, but it is not added to any new SAS data set.
二维码

扫码加我 拉你入群

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

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

2012-7-16 00:30:16
pobel 发表于 2012-7-15 07:36
Point= variable 不会输出到数据集中,所以不用DROP。

SAS Help:
非常感谢啊!!!我还想问一下,这段程序是online tutor里面的一个例子,会不会有什么别的原因这里需要加这个drop呢?或者是例子就是错了?
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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