I am not asking how to right a code. I am asking how to use Tasks in SAS EG to create such a statement.
I have an 'age' column and would like to group them into '<18', 'between 18 and 65', and '65+'.
Thank you in advance.
You can use the Query Builder tool and "Recode" a column. In Query Builder, select Computed Columns, then New->Recode Column.
Through point and click selections, this will build a CASE statement.
Hi @ralizadeh
You may want to look at this SAS Blog Entry : Creating a SAS format from a data set
Additional Info can be found here: SAS Enterprise Guide - Custom Tasks
One way of Binning values is using Formats.
Hope this helps
I just checked my EG 7.15 & 8.1 -- Under the Data Tasks, you should be able to find
- Create Format...
- Create Format from Data Set...
You can use the Query Builder tool and "Recode" a column. In Query Builder, select Computed Columns, then New->Recode Column.
Through point and click selections, this will build a CASE statement.
Thank you @ChrisHemedinger. You SAS guys here are awesome! 😀
Thanks @Reeza for sharing the document.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.