<?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 create a copy of first observation of each subject in sas? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-copy-of-first-observation-of-each-subject-in-sas/m-p/288121#M59363</link>
    <description>&lt;P&gt;Thats just controlling the output statement:&lt;/P&gt;
&lt;PRE&gt;data want;   /* assumes sorted!! */
  set have;
  by subject;
  if first.subject then do;
    output;
    output;
  end;
  else output;
run;&lt;/PRE&gt;
&lt;P&gt;The above will output two rows if first.subject. &amp;nbsp;Note needs to be sorted by subject and then the rows in the order you want.&lt;/P&gt;</description>
    <pubDate>Fri, 29 Jul 2016 13:58:13 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2016-07-29T13:58:13Z</dc:date>
    <item>
      <title>how to create a copy of first observation of each subject in sas?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-copy-of-first-observation-of-each-subject-in-sas/m-p/288117#M59362</link>
      <description>&lt;P&gt;I have a dataset with 10 observations per subject. I want to create &amp;nbsp;a copy of the first observation &amp;nbsp;so that &amp;nbsp;new datset will contain 11 observations per subject.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2016 13:54:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-copy-of-first-observation-of-each-subject-in-sas/m-p/288117#M59362</guid>
      <dc:creator>ari</dc:creator>
      <dc:date>2016-07-29T13:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a copy of first observation of each subject in sas?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-copy-of-first-observation-of-each-subject-in-sas/m-p/288121#M59363</link>
      <description>&lt;P&gt;Thats just controlling the output statement:&lt;/P&gt;
&lt;PRE&gt;data want;   /* assumes sorted!! */
  set have;
  by subject;
  if first.subject then do;
    output;
    output;
  end;
  else output;
run;&lt;/PRE&gt;
&lt;P&gt;The above will output two rows if first.subject. &amp;nbsp;Note needs to be sorted by subject and then the rows in the order you want.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2016 13:58:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-copy-of-first-observation-of-each-subject-in-sas/m-p/288121#M59363</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-07-29T13:58:13Z</dc:date>
    </item>
  </channel>
</rss>

