sas - how many values are missing for each observation -
i have data follows:
id date shoesize shoetype 1 4/3/12 . bball 2 . 12 running 3 1/2/12 8 . 4 . 9.5 bball
i want count number of '.' there in each row , make frequency table information. in advance
you can determine number of missing values in row nmiss , cmiss functions (nmiss numeric, cmiss character). if have list of of variables, should use list; if not, need deal fact number_missing missing (the -1 there).
data want; set have; number_missing=nmiss(of _numeric_) + cmiss(of _character_)-1; run;
then whatever want new variable.
Comments
Post a Comment