BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Is there a way to avoid repetition of the first group id in the first row after the summary line when this one was produced by break before ... / summarize? See the following code:
proc report data=sashelp.class headskip nowd;
column sex name (age height weight),mean;
define sex / group width=3;
define name / group;
break before sex / summarize;
break after sex / skip;
compute before sex; name='Total'; endcomp;
run;
2 REPLIES 2
polingjw
Quartz | Level 8
You could add a second compute block:

proc report data=sashelp.class headskip nowd;
column sex name (age height weight),mean;
define sex / group width=3;
define name / group;
break before sex / summarize;
break after sex / skip;
compute before sex; name='Total'; endcomp;
compute sex;
IF UPCASE(_BREAK_) NE 'SEX' THEN SEX= ' ';
ENDCOMP;
run;
Cynthia_sas
Diamond | Level 26
Hi:
Also, if you are going to use ODS eventually to send this output to RTF, PDF or HTML output files, remember that options such as HEADLINE, HEADSKIP, SKIP, and WIDTH= are only used by the LISTING window and will not work for other ODS destinations. So, for example, if you wanted to perform the EQUIVALENT of a SKIP for other ODS destinations, you would need to add:
[pre]
compute after sex;
line ' ';
endcomp;
[/pre]

because the SKIP in your code would be ignored.

cynthia
What is Bayesian Analysis?

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1098 views
  • 0 likes
  • 3 in conversation