Sum Statement
The following program is submitted:
data all_sales;
infile 'file-specification';
input receipts;
<insert statement(s) here>
run;
Which statement(s) complete(s) the program and produce(s) a running total of the Receipts variable?
a. total+receipts;
b. total 0;
sum total;
c. total=total+receipts;
d. total=sum(total,receipts);
答案:a
SAS中sum statement语句表达式,total+receipts;初始total为0,然后累加。
Here are examples of sum statements that illustrate various expressions:
balance+(-debit);
sumxsq+x*x;
nx+(x ne .);
if status='ready' then OK+1;
本文详细介绍了SAS编程语言中的Sum语句使用方法,通过具体示例讲解了如何在程序中实现变量的累加,包括初始化变量、使用不同表达式进行累加等操作,适合初学者和有一定经验的SAS开发者阅读。
909

被折叠的 条评论
为什么被折叠?



