SAS proc format statement

谁说我不能喝 提交于 2021-02-11 12:17:41

问题


I want to create a format on a numeric variable (say, age) to see the result as ">10". I tried as:

PROC FORMAT;
  VALUE agefmt 
    >10 - high  = '> 10'     /*10 to be excluded.*/
    other      = '<= 10'
    ;
RUN;

But it does not work. Please help.


回答1:


You made just a small mistake, the > must be < and between the values:

 PROC FORMAT;
   VALUE agefmt 
     10 <- high  = '> 10'     /*10 to be excluded.*/
     other      = '<= 10'
   ;
RUN;


来源:https://stackoverflow.com/questions/33346208/sas-proc-format-statement

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!