I have this data
Input
School Name | State | School Code | 26/07/2009 | 02/08/2009 | 09/08/2009 | 16/08/2009 |
Northwest High | IL | 14556 | 06 | 06 | 06 | 06 |
Georgia High | GA | 147 | 05 | 05 | 05 | 06 |
Macy Hgh | TX | 45456 | NA | NA | NA | NA |
The desired output is
School Name | State | School Code | Date | Absent |
Northwest High | IL | 14566 | 26/07/2009 | 6 |
Northwest High | IL | 14556 | 02/08/2009 | 6 |
Northwest High | IL | 14556 | 09/08/2009 | 6 |
Northwest High | IL | 14556 | 16/08/2009 | 6 |
Georgia High | GA | 147 | 26/07/2009 | 5 |
Georgia High | GA | 147 | 02/08/2009 | 5 |
Georgia High | GA | 147 | 09/08/2009 | 5 |
Georgia High | GA | 147 | 16/08/2009 | 6 |
Macy Hgh | TX | 45456 | 26/07/2009 | NA |
Macy Hgh | TX | 45456 | 02/08/2009 | NA |
Macy Hgh | TX | 45456 | 09/08/2009 | NA |
Macy Hgh | TX | 45456 | 16/08/2009 | NA |
This is the code I have written
proc sort data-work.input;
by School_Name State School_Code;
run;
proc transpose data=work.input out=work.inputModified;
by by School_Name State School_Code;
run
But I don't get the desired output the dates are actual variables when imported into sas the become _26_07_2009. Note there are about 185 dates and they are actual variables.
Pls Help
The variable _NAME_ will have the variable name and if your variables have labels _LABEL_ will have the the value of that label. You can read _NAME_ using the INPUT function to create DATE. _LABEL_ might contain a version of date that does not need to be translated.
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!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.