全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
2702 2
2006-11-22

Sas 语句中出现 set <SAS数据> nobs = all nobs=last

nobs还可以接哪些?怎么没有在帮助文件上找不到?

二维码

扫码加我 拉你入群

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

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

全部回复
2006-11-24 19:18:00

nobs 是临时变量.用于SET 语句表示从数据集读入的观测数.

nobs = all 的用法表现读入所有观测值.

nobs=last 用法用于循环语句中处理观测值.

do obsnum=1 to last;

set temp1 temp2 nobs=last;

output;

end;

二维码

扫码加我 拉你入群

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

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

2007-2-16 07:27:00

**nobs = all nobs=last help you to create a logical variable called 'all' or 'last', it doesn't matter what you want to call it. If you don't create a newvariable using this logical variable, it will never show up. If you want to use it, you can create a new variable called 'totalpeople' and the results are same:

totalpeople=all

totalpeople=last

**************************************************;

data test1;

input x;

cards;

3.3

5

0.6

11

608

;

run;

data test2;

set test nobs=all;

totalpeople=all;

run;

proc print data=test2;

run;

data test3;

set test nobs=last;

totalpeople=last;

run;

proc print data=test3;

run;

二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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