Returns the sum of the nonmissing arguments
Category: Descriptive Statistics
SUM ( argument,argument , )
argument
is numeric. If all the arguments have missing values, the result is a missing value. The argument list can consist of a variable list, which is preceded by OF.
SAS Statements | Results |
---|---|
x1=sum(4,9,3,8); | 24 |
x2=sum(4,9,3,8,.); | 24 |
x1=9; x2=39; x3=sum(of x1-x2); | 48 |
x1=5; x2=6; x3=4; x4=9; y1=34; y2=12; y3=74; y4=39; result=sum(of x1-x4, of y1-y5); | 183 |
x1=55; x2=35; x3=6; x4=sum(of x1-x3, 5); | 101 |
x1=7; x2=7; x5=sum(x1-x2); |
|
y1=20; y2=30; x6=sum(of y:); | 50 |