<?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: Renaming Table name in Proc Tabulate in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Renaming-Table-name-in-Proc-Tabulate/m-p/473975#M21201</link>
    <description>&lt;P&gt;Thanks it is working.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have one more quick question. In another analysis I have a code like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc tabulate data=perflags;&lt;BR /&gt;class &lt;SPAN&gt;Group2&lt;/SPAN&gt;;&lt;BR /&gt;var &amp;amp;var;&lt;BR /&gt;table (&amp;amp;var)*(N MEAN MIN MAX MEDIAN STD Q1 Q3), Group2;&lt;BR /&gt;by Group1;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;It is producing the output and displays the&amp;nbsp;values in group1 on top of the table,&amp;nbsp;&amp;nbsp;but the font of the values in group1 is really small. Is there a way I can increase it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Jun 2018 05:32:50 GMT</pubDate>
    <dc:creator>sfo</dc:creator>
    <dc:date>2018-06-28T05:32:50Z</dc:date>
    <item>
      <title>Renaming Table name in Proc Tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Renaming-Table-name-in-Proc-Tabulate/m-p/473627#M21176</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using Proc Tabulate in SAS 9.2 to create table for 8 variables. I have two questions:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Q1: Output window has Table 1, Table 2 .... Is there a way I can rename the Table 1 to name "BWT", Table 2 to "BSLD" ..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Q2. Is there a way I can use say a macro variable instead of tying for all the 8 variables. For example, if I have a variable say var =&amp;nbsp;BWT BSLD METSITES CRP NLR ALBU LDH bTMB. So, can I do something like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc Tabulate;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;class ADA4wk;&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P&gt;Var &amp;amp;var*(N MEAN MIN MAX MEDIAN STD Q1Q3), ADA4wk?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;**This is my original code**;&lt;BR /&gt;PROC TABULATE data=fdaada;&lt;BR /&gt;class ADA4wk;&lt;/P&gt;
&lt;P&gt;VAR BWT BSLD METSITES CRP NLR ALBU LDH bTMB;&lt;BR /&gt; TABLE BWT * (N MEAN MIN MAX MEDIAN STD Q1 Q3), ADA4wk;&lt;BR /&gt; TABLE BSLD * (N MEAN MIN MAX MEDIAN STD Q1 Q3), ADA4wk;&lt;BR /&gt; TABLE METSITES * (N MEAN MIN MAX MEDIAN STD Q1 Q3), ADA4wk;&lt;BR /&gt; TABLE CRP * (N MEAN MIN MAX MEDIAN STD Q1 Q3), ADA4wk;&lt;BR /&gt; TABLE NLR * (N MEAN MIN MAX MEDIAN STD Q1 Q3), ADA4wk;&lt;BR /&gt; TABLE ALBU * (N MEAN MIN MAX MEDIAN STD Q1 Q3), ADA4wk;&lt;BR /&gt; TABLE LDH * (N MEAN MIN MAX MEDIAN STD Q1 Q3), ADA4wk;&lt;BR /&gt; TABLE bTMB * (N MEAN MIN MAX MEDIAN STD Q1 Q3), ADA4wk;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 08:14:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Renaming-Table-name-in-Proc-Tabulate/m-p/473627#M21176</guid>
      <dc:creator>sfo</dc:creator>
      <dc:date>2018-06-27T08:14:46Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming Table name in Proc Tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Renaming-Table-name-in-Proc-Tabulate/m-p/473635#M21178</link>
      <description>&lt;P&gt;Use proc means to get the output:&lt;/P&gt;
&lt;PRE&gt;proc means data=fdaata;
  var bwt bsld metsites crp nlr albu ldh btmb;
  output out=want n= mean= min=max= median= stddev= q1= q3= / autoname;
run;&lt;/PRE&gt;
&lt;P&gt;Or you can use stackods to get it in a different layout:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/sgf/2015/07/17/customizing-output-from-proc-means/" target="_blank"&gt;https://blogs.sas.com/content/sgf/2015/07/17/customizing-output-from-proc-means/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please also note, avoid coding ALL IN CAPITALS as it is shouting.&amp;nbsp; And use the code window - its the {i} above post area.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 08:38:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Renaming-Table-name-in-Proc-Tabulate/m-p/473635#M21178</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-06-27T08:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming Table name in Proc Tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Renaming-Table-name-in-Proc-Tabulate/m-p/473773#M21189</link>
      <description>&lt;P&gt;First the simple question:&lt;/P&gt;
&lt;PRE&gt;Q2. Is there a way I can use say a macro variable instead of tying for all the 8 variables. For example, if I have a variable say var = BWT BSLD METSITES CRP NLR ALBU LDH bTMB. So, can I do something like

Proc Tabulate;
   class ADA4wk;;
   Var &amp;amp;var*(N MEAN MIN MAX MEDIAN STD Q1Q3), ADA4wk?

 run;
&lt;/PRE&gt;
&lt;P&gt;Other than the fact you do not want statistics on a VAR statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;var &amp;amp;var. ;
table ( &amp;amp;var )*(N MEAN MIN MAX MEDIAN STD Q1Q3), ADA4wk?
&lt;/PRE&gt;
&lt;P&gt;You still must declare the VAR variables on a var statement. The table syntax for using multiple variables in the same role is&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;table (var1 var2 var3) *(n mean &amp;lt;etc&amp;gt;).&amp;nbsp; Without the parentheses only the last variable would be crossed with the statistics.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;No clue for the Q1 directly in tabulate. Please describe the context of needing the table name in the results window.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 14:58:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Renaming-Table-name-in-Proc-Tabulate/m-p/473773#M21189</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-06-27T14:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming Table name in Proc Tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Renaming-Table-name-in-Proc-Tabulate/m-p/473822#M21196</link>
      <description>Thanks will try your solution to Q1. &lt;BR /&gt;&lt;BR /&gt;For my Q2 it’s more for convenience so that I can easily go  to  the results of the table if interest otherwise I have to scroll on the pages. &lt;BR /&gt;</description>
      <pubDate>Wed, 27 Jun 2018 16:55:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Renaming-Table-name-in-Proc-Tabulate/m-p/473822#M21196</guid>
      <dc:creator>sfo</dc:creator>
      <dc:date>2018-06-27T16:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming Table name in Proc Tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Renaming-Table-name-in-Proc-Tabulate/m-p/473975#M21201</link>
      <description>&lt;P&gt;Thanks it is working.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have one more quick question. In another analysis I have a code like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc tabulate data=perflags;&lt;BR /&gt;class &lt;SPAN&gt;Group2&lt;/SPAN&gt;;&lt;BR /&gt;var &amp;amp;var;&lt;BR /&gt;table (&amp;amp;var)*(N MEAN MIN MAX MEDIAN STD Q1 Q3), Group2;&lt;BR /&gt;by Group1;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;It is producing the output and displays the&amp;nbsp;values in group1 on top of the table,&amp;nbsp;&amp;nbsp;but the font of the values in group1 is really small. Is there a way I can increase it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jun 2018 05:32:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Renaming-Table-name-in-Proc-Tabulate/m-p/473975#M21201</guid>
      <dc:creator>sfo</dc:creator>
      <dc:date>2018-06-28T05:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming Table name in Proc Tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Renaming-Table-name-in-Proc-Tabulate/m-p/474107#M21207</link>
      <description>&lt;P&gt;Text appearance for things like the BY variables by default is ODS style dependent.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So you could experiment with other SAS supplied ODS styles, delve in the joys of Proc Tabulate and modify a style to create your own (style element to modify would be "style Byline") style and use that&amp;nbsp;or work with the TITLE statement and byline options.&lt;/P&gt;
&lt;P&gt;The first two are more in the once done you need not think about if you always want all bylines to have the new appearance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example with title and byline options:&lt;/P&gt;
&lt;PRE&gt;/* create some example data*/
proc sort data=sashelp.class out=work.class;
   by sex;
run;

/* turn off the default by line*/
options nobyline;
/* use a title statement to modify the text of the byline*/
title h=20pt '#byline';
proc tabulate data=work.class;
   class  sex age;
   var height;
   classlev sex/style=[foreground=red];
   by sex ;
   table age,
         height* mean
   ;
run; title;
/* reset the byline option for other procs*/
options byline;&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 Jun 2018 15:05:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Renaming-Table-name-in-Proc-Tabulate/m-p/474107#M21207</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-06-28T15:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming Table name in Proc Tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Renaming-Table-name-in-Proc-Tabulate/m-p/474211#M21210</link>
      <description>&lt;P&gt;Thanks a lot for the quick solution. It works perfectly.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jun 2018 18:59:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Renaming-Table-name-in-Proc-Tabulate/m-p/474211#M21210</guid>
      <dc:creator>sfo</dc:creator>
      <dc:date>2018-06-28T18:59:50Z</dc:date>
    </item>
  </channel>
</rss>

