全部版块 我的主页
论坛 休闲区 十二区 灌水吧
199 0
2024-06-06
data age;
    set test1;
    newage = tranwrd(age, "岁", "");
    if index(newage, "月") or index(newage, "天") then newage = "0";
run;
data age1 age2 age3 age4 age5;
set age;
if 0<=newage<=1 then output age1;
if 1<newage<=5 then output age2;
if 5<newage<=14 then output age3;
if 14<newage<=20 then output age4;
if 20<newage<=25 then output age5;
run;
将年龄变量中的“岁”字删去,如果是几个月几天的都变为“0”岁,再按照年龄分组。
用这个步骤整理了年龄数据之后,一直报错说是数值数据无效请问怎么解决。

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群