<?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 can I specify spanned column headings when printing tables? in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-can-I-specify-spanned-column-headings-when-printing-tables/m-p/888809#M6014</link>
    <description>&lt;P&gt;Thanks for the tip on using (*ESC*)n to delimit the words in the column headers. I was not aware of this linguistic feature. Where is it documented?&lt;/P&gt;</description>
    <pubDate>Thu, 10 Aug 2023 15:36:29 GMT</pubDate>
    <dc:creator>rbettinger</dc:creator>
    <dc:date>2023-08-10T15:36:29Z</dc:date>
    <item>
      <title>How can I specify spanned column headings when printing tables?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-can-I-specify-spanned-column-headings-when-printing-tables/m-p/888624#M6011</link>
      <description>&lt;P&gt;I want to use IML's table command to create a table with spanned column headings as shown in the image below.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 312px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/86573i78080AFBADDE021C/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;How can I specify that the individual words of the column headings be stacked up vertically into rows, essentially transposing the long line of text into a column of words?&lt;/P&gt;
&lt;P&gt;I know that I can use the submit/endsubmit block to access PROC TABULATE or PROC REPORT, but I want to stay within the PROC IML environment.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 18:08:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-can-I-specify-spanned-column-headings-when-printing-tables/m-p/888624#M6011</guid>
      <dc:creator>rbettinger</dc:creator>
      <dc:date>2023-08-09T18:08:26Z</dc:date>
    </item>
    <item>
      <title>Re: How can I specify spanned column headings when printing tables?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-can-I-specify-spanned-column-headings-when-printing-tables/m-p/888779#M6012</link>
      <description>&lt;P&gt;In general, IML provides much less control over the output as compared to PROC REPORT, so one option is to write the data to a SAS data set and then call PROC REPORT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you really want to try to do this in IML, I suggest you define the ODS template that you want (including how you want the headers to split) and then print the table by using the&amp;nbsp;TEMPLATE= option in &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/imlug/imlug_langref_sect510.htm" target="_self"&gt;the TablePrint subroutine&lt;/A&gt;. See &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/imlug/imlug_tables_sect014.htm" target="_self"&gt;"Advanced Printing of Tables"&lt;/A&gt; in the documentation. If you don't know how to create the ODS template, ask in the Programming-&amp;gt;ODS and Base reporting community.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BTW, I think you are using the word "spanned column" differently than the ODS folks do. A spanned column is a header that extends across two or more columns. I think the words you want to use are "split the column header at certain characters."&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2023 10:54:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-can-I-specify-spanned-column-headings-when-printing-tables/m-p/888779#M6012</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2023-08-10T10:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: How can I specify spanned column headings when printing tables?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-can-I-specify-spanned-column-headings-when-printing-tables/m-p/888782#M6013</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data class;
 set sashelp.class;
 obs+1;
 keep obs age weight height;
run;


proc iml;
use class;
read all var {obs};
read all var {age weight height} into x;
close;
print x[l='Wang-Mendel Rules' r=obs 
c={'Rule(*ESC*)nWeighted' 
 'Weighted(*ESC*)nAverage(*ESC*)nOf(*ESC*)nOutput' 
 'Weighted(*ESC*)nDeviation(*ESC*)nOf(*ESC*)nOutput'}];
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1691666745890.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/86640iFC40E8FF945A7BB6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1691666745890.png" alt="Ksharp_0-1691666745890.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2023 11:25:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-can-I-specify-spanned-column-headings-when-printing-tables/m-p/888782#M6013</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-08-10T11:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: How can I specify spanned column headings when printing tables?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-can-I-specify-spanned-column-headings-when-printing-tables/m-p/888809#M6014</link>
      <description>&lt;P&gt;Thanks for the tip on using (*ESC*)n to delimit the words in the column headers. I was not aware of this linguistic feature. Where is it documented?&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2023 15:36:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-can-I-specify-spanned-column-headings-when-printing-tables/m-p/888809#M6014</guid>
      <dc:creator>rbettinger</dc:creator>
      <dc:date>2023-08-10T15:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: How can I specify spanned column headings when printing tables?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-can-I-specify-spanned-column-headings-when-printing-tables/m-p/888819#M6015</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/319186"&gt;@rbettinger&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks for the tip on using (*ESC*)n to delimit the words in the column headers. I was not aware of this linguistic feature. Where is it documented?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That is ODS functionality.&amp;nbsp; It has nothing to do with IML.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you try that code and send the output to the plain old listing destination then those characters are just printed the same as the other characters.&lt;/P&gt;
&lt;PRE&gt;The SAS System                                                                                      09:18 Sunday, August 6, 2023  39

                                                   Wang-Mendel Rules
Rule(*ESC*)nWeighted Weighted(*ESC*)nAverage(*ESC*)nOf(*ESC*)nOutput Weighted(*ESC*)nDeviation(*ESC*)nOf(*ESC*)nOutput

                  14                                           112.5                                                69
                  13                                              84                                              56.5
                  13                                              98                                              65.3
                  14                                           102.5                                              62.8
                  14                                           102.5                                              63.5
                  12                                              83                                              57.3
                  12                                            84.5                                              59.8
                  15                                           112.5                                              62.5
                  13                                              84                                              62.5
                  12                                            99.5                                                59
                  11                                            50.5                                              51.3
                  14                                              90                                              64.3
                  12                                              77                                              56.3
                  15                                             112                                              66.5
                  16                                             150                                                72
                  12                                             128                                              64.8
                  15                                             133                                                67
                  11                                              85                                              57.5
                  15                                             112                                              66.5




&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Aug 2023 17:09:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-can-I-specify-spanned-column-headings-when-printing-tables/m-p/888819#M6015</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-08-10T17:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: How can I specify spanned column headings when printing tables?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-can-I-specify-spanned-column-headings-when-printing-tables/m-p/889481#M6025</link>
      <description>&lt;P&gt;As Tom says, you can use escape characters to insert inline formatting by using ODS markup commands. For details and some references to the doc and to papers, see&amp;nbsp;&lt;A href="https://blogs.sas.com/content/iml/2023/08/16/unicode-symbols-escapechar-sas.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2023/08/16/unicode-symbols-escapechar-sas.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2023 10:10:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-can-I-specify-spanned-column-headings-when-printing-tables/m-p/889481#M6025</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2023-08-16T10:10:08Z</dc:date>
    </item>
  </channel>
</rss>

