Hi all,
I have the following output with proc report
Term |
Trt1 |
Trt2 |
Trt3 |
PEP score |
|
|
|
N |
26 |
46 |
50 |
Mean |
15.42 |
17.83 |
20.97 |
Median |
59.0 |
32.0 |
33.0 |
Gender |
|
|
|
F |
19(79.2) |
0 |
19(25.8) |
M |
15(40.3) |
10(12.8) |
25(30.6) |
Unknown |
0 |
0 |
0 |
I have used the following code.
Proc report data=test;
Column term trt1 trt2 trt3;
define trt1/ display
style(header) =[just=c ]
style(column)=[just=d paddingright=5%];
define trt2/ display
style(header=[ just=c ]
style(column)=[just=d paddingright=2%];
define trt3/ display
style(header=[ just=c ]
style(column)=[just=d paddingright=2%];
run;
I need the output as follows
Term |
Trt1 |
Trt2 |
Trt3 |
VAP score |
|
|
|
N |
26 |
46 |
50 |
Mean |
15.42 |
17.83 |
20.97 |
Median |
59.0 |
32.0 |
33.0 |
Gender |
|
|
|
F |
19(79.2) |
0 |
19(25.8) |
M |
15(40.3) |
10(12.8) |
25(30.6) |
Unknown |
0 |
0 |
0 |
Appreciate your reply.
Regards
Data? Hard to test code without data.
Please post code in code or text box opened with the running man or </> icon as the message windows on this forum insert lots of junk and may reformat other stuff so that it takes a lot of editing to clean up for testing.
Sample data shared in the form of a working SAS data step that creates the data, result based on this sample data AND the working code that produced the output.
Use the running man icon for sharing code
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.