Hello ang good day everyone,
I am very new to EG.
I have several SAS data sets that I would like to adjust. For some I would like to take the row headers and put them into column headers, and others I would like to put the column headers and move them into row headers.
Can you please help with this?
Also, any good books I can get to help me with working through examples?
Thanks for your feedback.
It helps to provide example data, not as Excel, many of us don't want to open such files from unknown sources. Show what you have and what you want.
SAS has a procedure named transpose that has the purpose of reshaping data as you request but the devil is in the details.
For instance are your "row labels", such is not a concept for SAS data sets, text or numeric? Since the variables (columns) are restricted in naming your desired values may not work because variable names must start with _ or letter (not numerals) and the other characters may only be letters, digits or the _ character with a limit of 32 characters. HOWEVER SAS has the concept of a variable label with can be quite longer and is used to provide nice displays in most procedures or output.
I recommend starting with the SAS online help if installed. There is a section title 'Learning to Use SAS' which has example programs and data.
There is also some free on line classes available at: https://support.sas.com/edu/elearning.html?ctry=us&productType=library
Hello everyone,
Here is the data that I'm looking at as an example. I have placed it as a attachment.
Thank you for the quick response.
You showed us a data set. That's great. Now what are you trying to do with it?
Note that if you ever want code as a solution and you post an image, how would you expect us to work with the image. Based on what you've provided, the answer stands as it is. Please see the links in my previous post.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.