e*******e 发帖数: 75 | 1 Hi,
I have a SAS question as follows:
I have a data set A with variable var1-var50;
and I need to create a new variable newvar=1 if all the var1-var50 equal to
missing.
How can I create the newvar? Thanks, |
|
w****a 发帖数: 114 | 2 if n(of var1-var50)=0 then newvar=1;
to |
|
e*******e 发帖数: 75 | 3 Thank you, but what if var-var50 are character variables? |
|
k*****u 发帖数: 1688 | 4 %let myvar=var1...var50;
proc tabulate data=yourdata;
class &myvar.;
table &myvar., n;
run; |
|