<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to left align the text in Proc Means output? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-left-align-the-text-in-Proc-Means-output/m-p/391351#M93981</link>
    <description>&lt;P&gt;Great ways to align the labels. Thank you. Do you know why "by descending" in proc sort has no effect in the proc sort? Does proc print "style" options override previous options set forth?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=have stackods n maxdec=0;
    class op_fac_name; 
    var a1-a17;
    ods output summary=fac_types(drop=NObs _control_ where=(N ne 0));
run;

proc sort data=fac_types;
    by descending op_fac_name n;
run;

proc print data=fac_types label noobs style(header)={just=l};
    label variable='Defect Types';
	label n='Total number of defects';
	label op_fac_name='Facility name';
	format variable $group.;
	title "FIRST INCIDENCE";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Aug 2017 00:18:59 GMT</pubDate>
    <dc:creator>Cruise</dc:creator>
    <dc:date>2017-08-29T00:18:59Z</dc:date>
    <item>
      <title>How to left align the text in Proc Means output?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-left-align-the-text-in-Proc-Means-output/m-p/391341#M93976</link>
      <description>&lt;P&gt;I'd like to use proc means' output directly as a PDF file. For more visually appealing purpose, I wonder if i could left align the column label and the title in the final output as shown in image WANT below? &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAS forum.png" style="width: 293px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/14676iA93550A8F8B1CCDA/image-size/large?v=v2&amp;amp;px=999" role="button" title="SAS forum.png" alt="SAS forum.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=have stackods n maxdec=0;
    class fac; 
    var a1-a17;
    ods output summary=result(drop=NObs _control_ where=(N ne 0));
run;

proc print data=result label noobs;
    label variable='Birth Defect Types';
	label n='Total number of defects';
	label op_fac_name='Facility name';
	format variable $group.;
	title "FIRST INCIDENCE";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2017 22:38:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-left-align-the-text-in-Proc-Means-output/m-p/391341#M93976</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2017-08-28T22:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to left align the text in Proc Means output?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-left-align-the-text-in-Proc-Means-output/m-p/391342#M93977</link>
      <description>&lt;P&gt;There is a style option in proc print. &amp;nbsp;More generally, you can change the justification in the table template.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=sashelp.class stackods n maxdec=0;
    class sex; 
    var _numeric_;
	ods output summary=result(drop=NObs _control_ where=(N ne 0));
run;


proc print data=result label noobs style(header)={just=l};
    label variable='Birth Defect Types';
	label n='Total number of defects';
	label op_fac_name='Facility name';
	* format variable $group.;
	title "FIRST INCIDENCE";
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Aug 2017 22:53:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-left-align-the-text-in-Proc-Means-output/m-p/391342#M93977</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-08-28T22:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to left align the text in Proc Means output?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-left-align-the-text-in-Proc-Means-output/m-p/391345#M93979</link>
      <description>&lt;P&gt;Another option may be to set column widths so you don't have to deal with the offest on the second line of a column heading at all.&lt;/P&gt;
&lt;P&gt;Below is syntax example and may not have optimal widths due to your current style but should be easy to adjust.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc print data=result label noobs style(header)={just=l};
   var op_fac_name / style=[width=1.25in];
   var variable   / style=[width=1.5in];
   var n   / style=[width=1.75in];
   label variable='Birth Defect Types';
	label n='Total number of defects';
	label op_fac_name='Facility name';
	* format variable $group.;
	title "FIRST INCIDENCE";
run;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Aug 2017 23:11:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-left-align-the-text-in-Proc-Means-output/m-p/391345#M93979</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-08-28T23:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to left align the text in Proc Means output?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-left-align-the-text-in-Proc-Means-output/m-p/391351#M93981</link>
      <description>&lt;P&gt;Great ways to align the labels. Thank you. Do you know why "by descending" in proc sort has no effect in the proc sort? Does proc print "style" options override previous options set forth?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=have stackods n maxdec=0;
    class op_fac_name; 
    var a1-a17;
    ods output summary=fac_types(drop=NObs _control_ where=(N ne 0));
run;

proc sort data=fac_types;
    by descending op_fac_name n;
run;

proc print data=fac_types label noobs style(header)={just=l};
    label variable='Defect Types';
	label n='Total number of defects';
	label op_fac_name='Facility name';
	format variable $group.;
	title "FIRST INCIDENCE";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2017 00:18:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-left-align-the-text-in-Proc-Means-output/m-p/391351#M93981</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2017-08-29T00:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to left align the text in Proc Means output?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-left-align-the-text-in-Proc-Means-output/m-p/391360#M93982</link>
      <description>&lt;P&gt;Descending certainly works. &amp;nbsp;Here is an example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=sashelp.class out=c1;
   by descending sex;
   run;
proc print; run;
proc sort data=sashelp.class out=c2;
   by descending sex descending height;
   run;
proc print; run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Aug 2017 01:42:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-left-align-the-text-in-Proc-Means-output/m-p/391360#M93982</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-08-29T01:42:23Z</dc:date>
    </item>
  </channel>
</rss>

