<?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 outputting frequencies into one dataset in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/outputting-frequencies-into-one-dataset/m-p/253608#M13387</link>
    <description>&lt;P&gt;I would please like help trying to export these frequencies into one big table, instead of 4 seperate tables. &amp;nbsp;Is there a way to do this in SAS. &amp;nbsp;Any help would be greatly appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc freq data=M;&lt;BR /&gt;Tables (sex newrace livingage&amp;amp;year. risk;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 01 Mar 2016 21:40:04 GMT</pubDate>
    <dc:creator>beverlyobeng</dc:creator>
    <dc:date>2016-03-01T21:40:04Z</dc:date>
    <item>
      <title>outputting frequencies into one dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/outputting-frequencies-into-one-dataset/m-p/253608#M13387</link>
      <description>&lt;P&gt;I would please like help trying to export these frequencies into one big table, instead of 4 seperate tables. &amp;nbsp;Is there a way to do this in SAS. &amp;nbsp;Any help would be greatly appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc freq data=M;&lt;BR /&gt;Tables (sex newrace livingage&amp;amp;year. risk;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2016 21:40:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/outputting-frequencies-into-one-dataset/m-p/253608#M13387</guid>
      <dc:creator>beverlyobeng</dc:creator>
      <dc:date>2016-03-01T21:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: outputting frequencies into one dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/outputting-frequencies-into-one-dataset/m-p/253618#M13388</link>
      <description>&lt;P&gt;If it's all one way freqs this the way I do it:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*This code is an example of how to generate a table with 
Variable Name, Variable Value, Frequency, Percent, Cumulative Freq and Cum Pct
No macro's are required
Use Proc Freq to generate the list, list variables in a table statement if only specific variables are desired
Use ODS Table to capture the output and then format the output into a printable table.
*/

*Run frequency for tables;
ods table onewayfreqs=temp;
proc freq data=sashelp.class;
	table sex age;
run;

*Format output;
data want;
length variable $32. variable_value $50.;
set temp;
Variable=scan(table, 2);

Variable_Value=strip(trim(vvaluex(variable)));

keep variable variable_value frequency percent cum:;
label variable='Variable' 
	variable_value='Variable Value';
run;

*Display;
proc print data=want(obs=20) label;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;A href="https://gist.github.com/statgeek/e0903d269d4a71316a4e" target="_blank"&gt;https://gist.github.com/statgeek/e0903d269d4a71316a4e&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2016 22:38:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/outputting-frequencies-into-one-dataset/m-p/253618#M13388</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-03-01T22:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: outputting frequencies into one dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/outputting-frequencies-into-one-dataset/m-p/253811#M13402</link>
      <description>thank you this was extremely helpful</description>
      <pubDate>Wed, 02 Mar 2016 14:17:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/outputting-frequencies-into-one-dataset/m-p/253811#M13402</guid>
      <dc:creator>beverlyobeng</dc:creator>
      <dc:date>2016-03-02T14:17:44Z</dc:date>
    </item>
  </channel>
</rss>

