楼主: aucklandsvivian
11323 11

SAS里可以把 0 值替换成missing value吗?求code![已解决] [推广有奖]

11
aucklandsvivian 发表于 2012-12-27 11:50:08
a6566792 发表于 2012-12-26 12:19
不好意思,之前人在外地,  这里的array  _numeric_ 代表所有的数值变量。但是像你这种情况已经知道要处 ...
万分感谢啦

12
bobguy 发表于 2012-12-28 00:57:20
There is no need to recode variable values. A SAS format can deal it easily. Here is an example,

proc format;
value missingValue
      0=.
          other=[best12.]
          ;
        run;
data t1;
   do i=-1 to 5;
      x=i;
          y=ranuni(123);
          z=i;
          c='CHAR';
          output;
        end;
run;

proc print;
format _numeric_ missingValue.;
run;

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-6 04:57