1901 2
1905 1
1910 6
1925 .
1941 1
the following sas program is submitted and reference the raw data above:
data coins;
infile 'file';
input year quantity;
<insert statement here>
run;
which one of the following complete the program and produce a nonmissing value for the variable Totalquantity in the last observation of the output dataset?
A. totalquantity+quantity;
B. totalquantity=sum(totalquanity+quantity);
C. totalquantity 0;
sum totalquantity;
D. retain totalquantity 0;
totalquantity=totalquantity+quantity;
答案是A。可我觉得A和D是等价的。我看书上说A语句等价于
retain totalquantity 0;
totalquantity=sum(totalquantity,quantity);
上面这句话不就是D选项的第二个语句吗?