<?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 the every second observations in a dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-every-second-observations-in-a-dataset/m-p/544344#M150539</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
    set have;
    if mod(_n_,2)=0;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 19 Mar 2019 19:39:15 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2019-03-19T19:39:15Z</dc:date>
    <item>
      <title>How to find the every second observations in a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-every-second-observations-in-a-dataset/m-p/544338#M150537</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I remind an interview question a long time ago. the dataset looks like this:&lt;/P&gt;&lt;P&gt;ID&amp;nbsp;Value&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;80&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;70&lt;/P&gt;&lt;P&gt;3&amp;nbsp; 50&lt;/P&gt;&lt;P&gt;4&amp;nbsp; 40&lt;/P&gt;&lt;P&gt;5&amp;nbsp; 80&lt;/P&gt;&lt;P&gt;6&amp;nbsp; 79&lt;/P&gt;&lt;P&gt;8&amp;nbsp; 46&lt;/P&gt;&lt;P&gt;9&amp;nbsp; 67...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The question is that: create a table that contains every second record in this dataset.&lt;/P&gt;&lt;P&gt;So the desired output would be sth like:&lt;/P&gt;&lt;P&gt;2 70&lt;/P&gt;&lt;P&gt;4 40&lt;/P&gt;&lt;P&gt;6 79&lt;/P&gt;&lt;P&gt;9 67...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone provide some tips ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2019 19:24:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-every-second-observations-in-a-dataset/m-p/544338#M150537</guid>
      <dc:creator>ForrestYao</dc:creator>
      <dc:date>2019-03-19T19:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the every second observations in a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-every-second-observations-in-a-dataset/m-p/544344#M150539</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
    set have;
    if mod(_n_,2)=0;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 Mar 2019 19:39:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-every-second-observations-in-a-dataset/m-p/544344#M150539</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-03-19T19:39:15Z</dc:date>
    </item>
  </channel>
</rss>

