Hi all,
I would like to print out a report by grouping studysites for a dataset 'test'. I have a code below. However, I found out that the output file was order by studysite, it print out the studysite and the IDs one by one. I don't like that, I would like to out put the file with grouping the studysite first, then sorting the IDs later. I found there is no 'GROUP' option in the PROC PRINT, please advice how to approach it? Thanks.
options orientation=portrait; proc print data=test; var id repeat_id studysite DOB months days; where repeat_id in (&replistdob.); by studysite repeat_id; title 'More than 1 dob for a repeat ID'; run;
I would like to out put the file with grouping the studysite first, then sorting the IDs later.
use by studysite; instead of by studysite repeat_id;
I would like to out put the file with grouping the studysite first, then sorting the IDs later.
use by studysite; instead of by studysite repeat_id;
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.