Functions and CALL Routines |
Returns the number of non-missing numeric values.
Category: |
Descriptive Statistics
|
N(argument-1<,...argument-n>)
|
-
argument
-
specifies a numeric constant, variable,
or expression. At least one argument is required. The argument list can consist
of a variable list, which is preceded by OF.
The N function counts nonmissing values, whereas the NMISS
and the CMISS functions count missing values. N requires numeric arguments,
whereas CMISS works with both numeric and character values.
SAS Statements |
Results |
x1=n(1,0,.,2,5,.);
|
4
|
x2=n(1,2);
|
2
|
x3=n(of x1-x2);
|
2
|
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.