|
|
|
|
|
|
d*******1 发帖数: 293 | 1 Two sas data set: EMPLOYEE and SALARY
name age name salary
Bruce 30 Bruce 40000
Dan 35 Bruce 35000
Dan 37000
Dan.
The following SAS program is submitted:
data work.empsalary;
merge work. employee (in = inemp)
work.salary (in = insal);
by name;
if inemp and insal;
run;
How many observations will the data set WORK.EMPSALARY contain?
A. 2
B. 4
C.5
D. 6
Answer: B
It looks like the answer is A, why B, that is strange. | a*z 发帖数: 294 | 2 Check the attachment.
【在 d*******1 的大作中提到】![](/moin_static193/solenoid/img/up.png) : Two sas data set: EMPLOYEE and SALARY : name age name salary : Bruce 30 Bruce 40000 : Dan 35 Bruce 35000 : Dan 37000 : Dan. : The following SAS program is submitted: : data work.empsalary; : merge work. employee (in = inemp) : work.salary (in = insal);
| d*******1 发帖数: 293 | 3 If there is no condition, it should be 4.
Why it is 4 since there is a condition: if inemp and insal; | s********s 发帖数: 252 | 4 因为salary这个dataset中的每一个record都是以BRUCE或者DAN为名字,所以每一条都
可以被merge,不存在多余的observation,所以家不加in 这个option没有区别。
同样道理实用于employee 这个dataset,加不加in没有区别。 |
|
|
|
|
|
|