06-21-2017 01:35 PM
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.
06-21-2017 01:48 PM
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
06-21-2017 02:09 PM
06-21-2017 03:27 PM
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.