<?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 Summing many variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Summing-many-variables/m-p/110169#M22857</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;I think there's a simple solution to this problem, but I can't find it for the life of me.&lt;/P&gt;&lt;P&gt;I have a wide dataset of about 800 people that includes all the visits they made to their doctors over a period of 2 years. Some people visited once (everyone had to visit at least once to be included) and some visited many times- one person had 910 visits. For each visit, I have a continuous number that indicates the amount of time the doctor spent on that visit. For each patient, I want to add up all the times over the two year period so that each patient has one "total" time value. I want the missing values to count as zeroes. If there were not many visits, I would just use the sum statement, like:&lt;/P&gt;&lt;P&gt;total_time=sum(time1,time2,time3);&lt;/P&gt;&lt;P&gt;But do I really have to write it out 910 times?? I tried using a dash:&lt;/P&gt;&lt;P&gt;total_time=sum(time1-time910); &lt;/P&gt;&lt;P&gt;But total_time was missing as a result of doing that.&lt;/P&gt;&lt;P&gt;Is there any other way? Thanks so much in advance.&lt;/P&gt;&lt;P&gt;Laurie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Feb 2013 23:18:51 GMT</pubDate>
    <dc:creator>Lefty</dc:creator>
    <dc:date>2013-02-14T23:18:51Z</dc:date>
    <item>
      <title>Summing many variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summing-many-variables/m-p/110169#M22857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;I think there's a simple solution to this problem, but I can't find it for the life of me.&lt;/P&gt;&lt;P&gt;I have a wide dataset of about 800 people that includes all the visits they made to their doctors over a period of 2 years. Some people visited once (everyone had to visit at least once to be included) and some visited many times- one person had 910 visits. For each visit, I have a continuous number that indicates the amount of time the doctor spent on that visit. For each patient, I want to add up all the times over the two year period so that each patient has one "total" time value. I want the missing values to count as zeroes. If there were not many visits, I would just use the sum statement, like:&lt;/P&gt;&lt;P&gt;total_time=sum(time1,time2,time3);&lt;/P&gt;&lt;P&gt;But do I really have to write it out 910 times?? I tried using a dash:&lt;/P&gt;&lt;P&gt;total_time=sum(time1-time910); &lt;/P&gt;&lt;P&gt;But total_time was missing as a result of doing that.&lt;/P&gt;&lt;P&gt;Is there any other way? Thanks so much in advance.&lt;/P&gt;&lt;P&gt;Laurie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Feb 2013 23:18:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summing-many-variables/m-p/110169#M22857</guid>
      <dc:creator>Lefty</dc:creator>
      <dc:date>2013-02-14T23:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: Summing many variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summing-many-variables/m-p/110170#M22858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;totat=sum&lt;STRONG&gt;(OF&lt;/STRONG&gt; time1-time910);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Feb 2013 23:57:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summing-many-variables/m-p/110170#M22858</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-02-14T23:57:31Z</dc:date>
    </item>
  </channel>
</rss>

