<?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 shorten the calculation of similar varname? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-shorten-the-calculation-of-similar-varname/m-p/730329#M227405</link>
    <description>&lt;P&gt;Try&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;windavg = mean(of wind1-wind4);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 31 Mar 2021 08:21:45 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2021-03-31T08:21:45Z</dc:date>
    <item>
      <title>How to shorten the calculation of similar varname?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-shorten-the-calculation-of-similar-varname/m-p/730327#M227403</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Today I need to calculate the average of 4 variables: wind1,wind2,wind3,wind4.&lt;/P&gt;&lt;P&gt;The answer is&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data storm_wingavg;
	set pg1.storm_range;
	*Add assignment statements;
	windavg=mean(wind1,wind2, wind3,wind4);
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But I remember there is one way using "of" or else when dealing with variables having the same prefix like this case, but I do not know the keyword to search for documents about that. Can you please hint me out?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 08:19:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-shorten-the-calculation-of-similar-varname/m-p/730327#M227403</guid>
      <dc:creator>ResoluteCarbon</dc:creator>
      <dc:date>2021-03-31T08:19:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to shorten the calculation of similar varname?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-shorten-the-calculation-of-similar-varname/m-p/730329#M227405</link>
      <description>&lt;P&gt;Try&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;windavg = mean(of wind1-wind4);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 31 Mar 2021 08:21:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-shorten-the-calculation-of-similar-varname/m-p/730329#M227405</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-03-31T08:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to shorten the calculation of similar varname?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-shorten-the-calculation-of-similar-varname/m-p/731062#M227710</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After learning for a while, I come back with another solution to add on in case anyone coming and search this discussion&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;windavg = mean(of wind1-wind4);
/*or*/
windavg=mean(of w:);
/*or*/
windavg=mean(of wind:);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Cheers,&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 21:38:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-shorten-the-calculation-of-similar-varname/m-p/731062#M227710</guid>
      <dc:creator>ResoluteCarbon</dc:creator>
      <dc:date>2021-04-02T21:38:34Z</dc:date>
    </item>
  </channel>
</rss>

