I want to check if all variables of a data set are missing except one, but without knowledge about the variable names. (I import some excel files of different structure and want to get rid of all the rows with only missing values, except there is a column with the row number that will be non missing.) So my first idea was to concatenate all the (maybe missing) values and then check this value, but the concatenation using 'cats(of _all_)' does not work. Code: data x;
input x1 x2 x3 x4 x5; Concat = cats(of _all_); *Concat = cats(of X1-X5); *Concat = cats(of X1--X5);
datalines;
1 2 3 4 5
. 2 . 4 5
. . . . .
;
run; Output: x1 x2 x3 x4 x5 Concat
1 2 3 4 5 12345
. 2 . 4 5 .
. . . . . . The versions with 'cats(of X1-X5)' and 'cats(of X1--X5)' are working as expected, but as mentioned I do not want to determine any knowledge about the variable names at this point. I would appreciate any help on this.
... View more