SUPPORT / SAMPLES & SAS NOTES
 

Support

Sample 46235: How to mimic the N function for character variables

DetailsCodeAboutRate It

The N function counts the number of non-missing values for numeric variables. We do not have a function that does this for character variables.

The sample code on the Full Code tab counts the non-missing character values.

The CMISS and NMISS functions were introduced in SAS® 9.2 to count missing values for character and numeric values across observations.

Note: Development is investigating the possibility of adding a new function to count non-missing character values.




These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.