【发布时间】:2016-05-25 15:13:20
【问题描述】:
我有不同员工工资的数值。我想将范围分成几类。但是我不想要一个新列,我只想将现有的薪水列格式化为这个范围方法:
至少 20,000 美元但低于 100,000 美元 -
至少 100,000 美元,最高 500,000 美元 - >100,000 美元
缺少 - 缺少薪水
任何其他值 - 工资无效
我在性别方面做过类似的事情。我只想使用 proc print 和 format 命令来显示薪水和性别。
DATA Work.nonsales2;
SET Work.nonsales;
RUN;
PROC FORMAT;
VALUE $Gender
'M'='Male'
'F'='Female'
'O'='Other'
other='Invalid Code';
PROC FORMAT;
VALUE salrange
'At least $20,000 but less than $100,000 '=<$100,000
other='Invalid Code';
PROC PRINT;
title 'Salary and Gender';
title2 'for Non-Sales Employees';
format gender $gender.;
RUN;
【问题讨论】:
标签: format sas categories data-manipulation