全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
2365 8
2012-09-13

QUESTION 29

The following SAS program is submitted:?


libnametemp 'SAS-data-library';


data work.new;


set temp.jobs;


format newdate mmddyy10.;


qdate= qtr(newdate);


ddate= weekday(newdate);


run;


proc print data = work.new;


run;


The variable NEWDATE contains the SAS date value forApril 15, 2000. What output is produced if April 15, 2000 falls on a Saturday?

A. Obs newdate qdate ddate 1 APR152000 2 6


B. Obs newdate qdate ddate 1 04/15/2000 2 6

C. Obs newdate qdate ddate 1 APR152000 2 7


D. Obs newdate qdate ddate 1 04/15/2000 2 7

Answer: D

为什么不是B呢?

二维码

扫码加我 拉你入群

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

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

全部回复
2012-9-13 01:51:40
QUESTION 38
The SASDATA.BANKS data set has five observations when the following SAS
program is submitted:

libnamesasdata 'SAS-date-library';

data allobs;

set sasdata.banks;

capital=0;

do year = 2000 to 2020 by 5;

capital + ((capital+2000) * rate);

output;

end;

How many observations will the ALLOBS data set contain?
A. 5 B. 15 C. 20 D. 25
Answer: D
do year = 2000 to 2020 by 5;
不就是2000,2005,2010,2015,2020共5个obersvations吗?
二维码

扫码加我 拉你入群

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

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

2012-9-13 01:54:32
???QUESTION 39
A raw data file is listed below:

----|----10---|----20---|----30

John McCloskey 35 71

June Rosesette 10 43

TinekeJones 9 37

The following SAS program is submitted using the raw data file as input:
data work.homework;

infile 'file-specification';

input name $ age height;

if age LE 10;

run;

How many observations will the WORK.HOMEWORK data set contain?
A. 0

B. 2

C. 3

D. No data set is created as the program fails to execute due to errors.
Answer: C
row data里后面两列数字是第一列是age,后一列是height吗?如果是这样的话,不应该是B吗?
二维码

扫码加我 拉你入群

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

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

2012-9-13 01:56:14
QUESTION 59
The following SAS program is submitted:

data work.staff;

JobCategory= 'FA';

JobLevel= '1';

jobCategory= JobCategory || JobLevel;

run;

Which one of the following is the value of the variable JOBCATEGORY in the output data set?
A. FA

B. FA1

C. FA 1

D. ' ' (missing character value)
Answer: A
对正确答案无疑问。只是想弄清楚jobCategory= JobCategory || JobLevel;
到底是什么意思?“||”代表什么啊?
二维码

扫码加我 拉你入群

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

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

2012-9-13 08:17:40
SAS Help: The WEEKDAY function produces an integer that represents the day of the week, where 1=Sunday, 2=Monday, ..., 7=Saturday
二维码

扫码加我 拉你入群

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

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

2012-9-13 08:19:26
Yvonnej1987 发表于 2012-9-13 01:51
QUESTION 38
The SASDATA.BANKS data set has five observations when the following SAS
program i ...
set SASDATA.BANKS;会读入5条记录,每条记录执行do循环会有5个output。因此会有5*5=25条
二维码

扫码加我 拉你入群

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

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

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

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