Language Reference |
COUNTMISS Function |
The COUNTMISS function counts the number of missing values in a matrix. The arguments are as follows:
specifies an numerical or character matrix. The COUNTMISS function counts the number of missing values in this matrix.
specifies the method used to count the missing values. This argument is optional. The following are valid values:
specifies that all missing values are counted. This is the default value. The function returns a matrix.
specifies that the function return an matrix whose th element is the number of missing values in the th row of x.
specifies that the function return a matrix whose th element is the number of missing values in the th row of x.
The method argument is not case-sensitive. The first three characters are used to determine the value.
For example, the following statements count missing values for the matrix x:
x = {1 2 3, . 0 2, 1 . ., 1 0 . }; totalMiss = countmiss(x); rowMiss = countmiss(x, "ROW"); colMiss = countmiss(x, "COL"); print totalMiss, rowMiss, colMiss;
Copyright © SAS Institute, Inc. All Rights Reserved.