l******8 发帖数: 234 | 1 正在复习SAS base,遇到一道题想请教一下版上的前辈:
35.given the SAS data set SASDATA.TWO:
X Y
— –
5 2
3 1
5 6
The following SAS program is submitted:
data SASUSER.ONE SASUSER.TWO OTHER;
set SASDATA.TWO;
if X eq 5 then output SASUSER.ONE;
if Y lt 5 then output SASUSER.TWO;
output;
run;
What is the result?
答案是A:
data set SASUSER.ONE has 5 observations
data set SASUSER.TWO has 5 observations
data set WORK.OTHER has 3 observations
请问一下为什么选A? 谢谢! |
z*******e 发帖数: 32 | 2 我也在复习base。
但是我看到的答案是SASUSER.ONE has two obs,SASUSER.TWO has one obs, and
others has 5 obs。
一同请教其他大侠! |
i**g 发帖数: 2261 | 3 X Y
— –
5 2
3 1
5 6
5 2
5 6
【在 l******8 的大作中提到】 : 正在复习SAS base,遇到一道题想请教一下版上的前辈: : 35.given the SAS data set SASDATA.TWO: : : X Y : — – : 5 2 : 3 1 : 5 6 : : The following SAS program is submitted:
|
z*******e 发帖数: 32 | 4 想明白了。
最后一个output是不论如何把某一条record都往三个one/two/others里面放一遍。所以
others里面原来三条record都重复一遍。is this helpful? |