全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
2919 3
2009-08-27
Question 15.
data numrecords;
infile 'file-specification';
input @1 patient $15. relative $ 16-26@;
if relative='children' then
input @ 54 diagnosis $15. @;
else if relative= 'parents' then
input @28 doctor $15. clinic $ 44-53 @54 diagnosis $15. @;
input age;
run;

How many raw data records are read during each iteration of the DATA step during execution?
A.1   B.2  C.3  D.4

Question 39.
A raw data file is listed below:
John McCloskey 35 71
June Rosesette 10 43
TinekeJones 9 37
The following SAS program is submitted using the raw date file as input:
data work.homework;
infile 'file-specification';
input name $ age height;
if age LE 10;
run;

How many observtions will the WORK.HOMEWORK data set contain?

答案选的是3个,是不是因为当读到第一个和第二个age的时候是missing value,而missing value也是LE 10的,所以是3个observation?


Question 72.
The following SAS program is submitted:
data work,test;
First='Ipswich, England';
City=substr(First,1,7);
City_Country=City!!'; '!!'England';
run;

Which one of the following is the value of the variable CITY_COUNTRY in the output data set?

B. Ipswich, England
D. Ipswich , England
(答案选D,但我不明白为什么用了substr()函数以后给City的长度为8了,不是应该是和First的长度是一样的么?)
二维码

扫码加我 拉你入群

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

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

全部回复
2009-8-27 08:13:22
great idea
二维码

扫码加我 拉你入群

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

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

2009-8-27 10:36:59
Question 39: 正如你想的那样,missing value <10;
Question 72:我想在答案‘D. Ipswich , England’里面的空格不是只指一个空格,而是表示要在city后补上空格以便维持和first一样的长度吧!
二维码

扫码加我 拉你入群

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

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

2009-8-27 10:57:19
变量city后面就有空格
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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