<?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: BY vs CLASS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/BY-vs-CLASS/m-p/616375#M180438</link>
    <description>&lt;P&gt;Rick has a wonderful article on this:&amp;nbsp;&lt;A href="https://blogs.sas.com/content/iml/2018/02/14/difference-class-and-by-statements-sas.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2018/02/14/difference-class-and-by-statements-sas.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 10 Jan 2020 03:43:49 GMT</pubDate>
    <dc:creator>unison</dc:creator>
    <dc:date>2020-01-10T03:43:49Z</dc:date>
    <item>
      <title>BY vs CLASS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/BY-vs-CLASS/m-p/616371#M180434</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In which instant I can use BY or&amp;nbsp;CLASS in the Proc Means procedure&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;in SAS prep guide, Scenario 7, they asked to:&lt;/P&gt;
&lt;P&gt;　&lt;/P&gt;
&lt;P&gt;Use PROC MEANS to calculate the mean and standard deviation for the variables AvgHighTemp and AvgLowTemp &lt;STRONG&gt;by&lt;/STRONG&gt; the new Month variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;In the code they use&amp;nbsp;&lt;STRONG&gt;CLASS&lt;/STRONG&gt; instead of &lt;STRONG&gt;BY&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Q: How do I know when to use CLASS or BY, Please help me to understand&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;data work.scenario7; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;set cert.temp18; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;format Day date9.; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;Month=month(day); &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;run;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;proc freq data=work.scenario7; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;tables HighTemp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;run;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;proc means data=work.scenario7;&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;class month;&lt;/STRONG&gt; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;var AvgLowTemp AvgHighTemp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;run;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2020 03:04:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/BY-vs-CLASS/m-p/616371#M180434</guid>
      <dc:creator>souji</dc:creator>
      <dc:date>2020-01-10T03:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: BY vs CLASS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/BY-vs-CLASS/m-p/616375#M180438</link>
      <description>&lt;P&gt;Rick has a wonderful article on this:&amp;nbsp;&lt;A href="https://blogs.sas.com/content/iml/2018/02/14/difference-class-and-by-statements-sas.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2018/02/14/difference-class-and-by-statements-sas.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2020 03:43:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/BY-vs-CLASS/m-p/616375#M180438</guid>
      <dc:creator>unison</dc:creator>
      <dc:date>2020-01-10T03:43:49Z</dc:date>
    </item>
  </channel>
</rss>

