Hi,
I would like to produce this want dataset from have. It's like affecting only name = COUPLE, but name = SINGLE should not be edited.
data have;input id name $;cards;1 SINGLE2 COUPLE3 COUPLE;run;
data want;input id name $;cards;1 SINGLE2 MAN2 WOMAN3 MAN3 WOMAN;run;
Thank you
Use an explicit OUTPUT statement to override default.
If name='COUPLE' then do;
name='MAN'; output;
Name='WOMAN'; output;
end;
else output;
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Latest Updates
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.
Browse our catalog!