<?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 to find average of few rows at a time in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-average-of-few-rows-at-a-time/m-p/790905#M253256</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=have nway noprint;
 CLASS id month;
 VAR   weight;
 output out=want mean= / autoname;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
    <pubDate>Wed, 19 Jan 2022 15:07:05 GMT</pubDate>
    <dc:creator>sbxkoenk</dc:creator>
    <dc:date>2022-01-19T15:07:05Z</dc:date>
    <item>
      <title>How to find average of few rows at a time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-average-of-few-rows-at-a-time/m-p/790903#M253254</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to set up a code that will automatically find the average of certain rows at a time. For example, in the data set below I want to find the average weight each month:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data have;
input id $ weight month;
cards;
1 108 1&lt;BR /&gt;1 112 1
1 114 2
1 118 2
2 100 1
2 108 1
2 110 2&lt;BR /&gt;2 102 2&lt;BR /&gt;2 100 2
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;So ideally, the new data table I want will look like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data want;
input id $ avg_weight month;
cards;
1 110 1
1 116 2
2 104 1
2 104 2
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks for any/all help!&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 15:03:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-average-of-few-rows-at-a-time/m-p/790903#M253254</guid>
      <dc:creator>pr1496</dc:creator>
      <dc:date>2022-01-19T15:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to find average of few rows at a time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-average-of-few-rows-at-a-time/m-p/790905#M253256</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=have nway noprint;
 CLASS id month;
 VAR   weight;
 output out=want mean= / autoname;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 15:07:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-average-of-few-rows-at-a-time/m-p/790905#M253256</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2022-01-19T15:07:05Z</dc:date>
    </item>
  </channel>
</rss>

