x*******u 发帖数: 500 | 1 有100多个variables, 想delete那些有missing value的variable(或者output
variable name), 请问有何简单的方法。 谢谢 |
x*******u 发帖数: 500 | 2 只想出这个笨办法, 有没有更简单的
data a;
input x y z m n;
cards;
1 2 3 . 4
2 3 4 5 6
1 . 3 5 6
1 3 4 . .
;
run;
proc contents data=a out=out(keep=name); run;
proc sql noprint;
select name into: name separated by ' ' from out;
run;
proc transpose data=a out=b;
run;
data c; set b;
missnum=nmiss(of col1-col4);
run;
data d(where=(missnum=0))
e(where=(missnum>0));
set c;
run; |
n*****s 发帖数: 10232 | 3 transpose
make a small data set to record all the missing value variable name
de-duplicate the small data set
outer left join
transpose back
how is this
【在 x*******u 的大作中提到】 : 只想出这个笨办法, 有没有更简单的 : data a; : input x y z m n; : cards; : 1 2 3 . 4 : 2 3 4 5 6 : 1 . 3 5 6 : 1 3 4 . . : ; : run;
|