<?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: SAS Array coding in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/624024#M183753</link>
    <description>&lt;P&gt;If you mean you want to count the number of reactions instead of their sum, replace this lien&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;sum_nreactions =sum(of whoreact[*]);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;with&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;num_reactions =n(of whoreact[*]);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The N() function counts the number of non-missing values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;- Jan.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Feb 2020 21:20:02 GMT</pubDate>
    <dc:creator>jklaverstijn</dc:creator>
    <dc:date>2020-02-11T21:20:02Z</dc:date>
    <item>
      <title>SAS Array coding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/624017#M183749</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have dataset with&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;who_reacted_1 &amp;nbsp; who_reacted_2----so on&lt;/P&gt;&lt;P&gt;&amp;nbsp;1. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 5556 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5555 &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I want to calculate total number of who_reacted-like for first it should be 2&lt;/P&gt;&lt;P&gt;who_reacted_1 they all are character.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data testing_nreact; set redcap;
array whoreact(*) who_reacted_1-who_reacted_40;
  do i=1 to 40;
  n_reaction=0;
  sum_nreactions =sum(of whoreact[*]);
  end;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;FONT&gt;Can anyone help with code??&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 21:07:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/624017#M183749</guid>
      <dc:creator>knargis160</dc:creator>
      <dc:date>2020-02-11T21:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Array coding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/624018#M183750</link>
      <description>&lt;P&gt;I cannot understand this sentence at all: "I want to calculate total number of who_reacted-like for first it should be 2 who_reacted_1 they all are character."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you please explain further? And maybe provide an example with more than one data point?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 21:11:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/624018#M183750</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-02-11T21:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Array coding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/624024#M183753</link>
      <description>&lt;P&gt;If you mean you want to count the number of reactions instead of their sum, replace this lien&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;sum_nreactions =sum(of whoreact[*]);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;with&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;num_reactions =n(of whoreact[*]);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The N() function counts the number of non-missing values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;- Jan.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 21:20:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/624024#M183753</guid>
      <dc:creator>jklaverstijn</dc:creator>
      <dc:date>2020-02-11T21:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Array coding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/624037#M183759</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12460"&gt;@jklaverstijn&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;If you mean you want to count the number of reactions instead of their sum, replace this lien&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;sum_nreactions =sum(of whoreact[*]);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;with&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;num_reactions =n(of whoreact[*]);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The N() function counts the number of non-missing values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;- Jan.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;AND doing either of Sum(of whoreact[*]) or N(of whoreact[*]) in a loop is completely unneeded. Unless you really want to sum/count the same things 40 times to get the one result.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 21:45:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/624037#M183759</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-02-11T21:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Array coding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/624770#M184083</link>
      <description>&lt;P&gt;Thanks it worked.&lt;/P&gt;&lt;P&gt;Can you also explain how should change the &lt;SPAN class="token function" style="box-sizing: inherit; color: blue; font-family: Consolas,Monaco,&amp;amp;quot; andale mono&amp;amp;quot;,&amp;amp;quot;ubuntu mono&amp;amp;quot;,monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;n&lt;/SPAN&gt;&lt;SPAN class="token punctuation" style="box-sizing: inherit; color: #999999; font-family: Consolas,Monaco,&amp;amp;quot; andale mono&amp;amp;quot;,&amp;amp;quot;ubuntu mono&amp;amp;quot;,monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: black; direction: ltr; font-family: Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace; font-size: 1em; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; -ms-hyphens: none; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-shadow: 0px 1px white; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: normal; word-spacing: normal;"&gt;of whoreact&lt;/SPAN&gt;&lt;SPAN class="token punctuation" style="box-sizing: inherit; color: #999999; font-family: Consolas,Monaco,&amp;amp;quot; andale mono&amp;amp;quot;,&amp;amp;quot;ubuntu mono&amp;amp;quot;,monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;[&lt;/SPAN&gt;&lt;SPAN class="token operator" style="box-sizing: inherit; color: #a67f59; font-family: Consolas,Monaco,&amp;amp;quot; andale mono&amp;amp;quot;,&amp;amp;quot;ubuntu mono&amp;amp;quot;,monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;*&lt;/SPAN&gt;&lt;SPAN class="token punctuation" style="box-sizing: inherit; color: #999999; font-family: Consolas,Monaco,&amp;amp;quot; andale mono&amp;amp;quot;,&amp;amp;quot;ubuntu mono&amp;amp;quot;,monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;]&lt;/SPAN&gt;&lt;SPAN class="token punctuation" style="box-sizing: inherit; color: #999999; font-family: Consolas,Monaco,&amp;amp;quot; andale mono&amp;amp;quot;,&amp;amp;quot;ubuntu mono&amp;amp;quot;,monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;) if the participant should be (55-60)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2020 09:59:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/624770#M184083</guid>
      <dc:creator>knargis160</dc:creator>
      <dc:date>2020-02-14T09:59:43Z</dc:date>
    </item>
  </channel>
</rss>

