w********y 发帖数: 371 | 1 name rate
firstcapital 0.0718
directbank 0.0721
virtualdirect 0.0728
the following SAS program is submitted:
data newbank;
do year=1 to 3;
set banks;
capital+5000;
end;
run;
how many observations and variables will exist in the sas dataset newbank?
A. 0 observation and 0 variable
B. 1 and 4
C. 3 and 9
D. 9 and 2
Thanks! |
d******9 发帖数: 404 | 2 I think B is correct.
4 Vars, 1 obs. |
w********y 发帖数: 371 | 3 我run了一下
set放在do里不太明白 为什么是name里是virtualdirect 而不是firstbank |
q***s 发帖数: 17 | 4 /* SAS Base 123 */
/* Question 087 */
/* banks dataset */
data banks;
input name $1-13 rate;
datalines;
FirstCapital 0.0718
DirectBank 0.0721
VirtualDirect 0.0728
;
title 'banks';
proc print data=banks;
run;
/* newbank dataset */
data newbank;
do year = 1 to 3;
set banks;
capital + 5000;
end;
run;
title 'newbank';
proc print data=newbank;
run;
title;
Results newbank
Obs year name rate capital
1 4 VirtualDirect 0.0728 15000 |