<?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 &amp;quot;ERROR:  The AVG summary function requires a numeric argument.&amp;quot; Why does it keep saying? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/quot-ERROR-The-AVG-summary-function-requires-a-numeric-argument/m-p/357390#M83891</link>
    <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just have a minor error. I am sure this isn't a big deal, but I can't figure out the solution.&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;PRE&gt;proc sql;
create table test.class_analysis as
select sex, 
avg(age) as avg_age,
avg(height) as avg_height,
avg(weight) as avg_weight
from test.class
group by sex;
quit;

ERROR:  The AVG summary function requires a numeric argument.&lt;/PRE&gt;&lt;P&gt;So my question is, why does it keep saying error? It is in numeric values, I checked it. &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you all fro answers. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 10 May 2017 07:58:21 GMT</pubDate>
    <dc:creator>Derdavos</dc:creator>
    <dc:date>2017-05-10T07:58:21Z</dc:date>
    <item>
      <title>"ERROR:  The AVG summary function requires a numeric argument." Why does it keep saying?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quot-ERROR-The-AVG-summary-function-requires-a-numeric-argument/m-p/357390#M83891</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just have a minor error. I am sure this isn't a big deal, but I can't figure out the solution.&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;PRE&gt;proc sql;
create table test.class_analysis as
select sex, 
avg(age) as avg_age,
avg(height) as avg_height,
avg(weight) as avg_weight
from test.class
group by sex;
quit;

ERROR:  The AVG summary function requires a numeric argument.&lt;/PRE&gt;&lt;P&gt;So my question is, why does it keep saying error? It is in numeric values, I checked it. &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you all fro answers. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2017 07:58:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quot-ERROR-The-AVG-summary-function-requires-a-numeric-argument/m-p/357390#M83891</guid>
      <dc:creator>Derdavos</dc:creator>
      <dc:date>2017-05-10T07:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: "ERROR:  The AVG summary function requires a numeric argument." Why does it keep sayin</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quot-ERROR-The-AVG-summary-function-requires-a-numeric-argument/m-p/357393#M83894</link>
      <description>&lt;P&gt;Since this works very well:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table class_analysis as
select sex, 
avg(age) as avg_age,
avg(height) as avg_height,
avg(weight) as avg_weight
from sashelp.class
group by sex;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I suggest you do a proc contents on your dataset test.class and look at the output. At least one of the three analysis variables is of type character.&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2017 08:14:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quot-ERROR-The-AVG-summary-function-requires-a-numeric-argument/m-p/357393#M83894</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-05-10T08:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: "ERROR:  The AVG summary function requires a numeric argument." Why does it keep sayin</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quot-ERROR-The-AVG-summary-function-requires-a-numeric-argument/m-p/357395#M83896</link>
      <description>&lt;P&gt;Hardly possible to suggest anything useful without knowing the structure of test.class. The type of age, height and weight must be numeric. Maybe they are char and contain only numbers, but this violates the requirement of avg function.&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2017 08:17:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quot-ERROR-The-AVG-summary-function-requires-a-numeric-argument/m-p/357395#M83896</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2017-05-10T08:17:14Z</dc:date>
    </item>
  </channel>
</rss>

