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 的大作中提到】 : 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,
|
e*******e 发帖数: 75 | 3 Thank you, but what if var-var50 are character variables? |
b*****e 发帖数: 223 | 4 use array
Or, does nmiss work for both num or char? I am not sure
【在 e*******e 的大作中提到】 : Thank you, but what if var-var50 are character variables?
|
w****a 发帖数: 114 | 5 一样
【在 e*******e 的大作中提到】 : Thank you, but what if var-var50 are character variables?
|
e*******e 发帖数: 75 | 6 so, how I can use array to do it?
Thanks |