@Programming
Novice SAS Programmer here: I have a very large datasets I am combing through, however I am running into a issue with how I might go about automating the consolidation of a repeated measures arrangement into a new dataset. Some background information which might help orient the community to the attached sample document "SAS_question.csv":
How should the code be written to accomplish this? I am willing to learn what will be the easiest way to accomplish this.
Further background -- this will be for COVID-19 related research and I am trying to get this valuable information out to the medical community ASAP. Any help would be greatly appreciated!!
great idea!!!!
Question, why are your + and - values character? Pretty much a trivial exercise if they are numeric.
For example if the score is numeric:
proc summary data=have nway; class id; var score; output out=work.summary (drop=_type_) min=; run;
Would create a new data set with the Id, the smallest score (and an extra variable _freq_ with the number of records that ID had in the starting set , you could remove it by adding it to the Drop list).
Here is how to read that data in so score is numeric:
data have; infile "d:\path\SASQuestion.csv" dlm=',' ; input id $ score; run;
I didn't even think of that!!!!
Thank you!!! 🙂
>I have a very large datasets
Are these SAS data sets? If so just run this:
proc sql;
select ID, min(SCORE) from TABLE group by ID;
quit;
great idea!!!!
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.