<?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: select observations in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/select-observations/m-p/32134#M7711</link>
    <description>proc sort;&lt;BR /&gt;
by id bld_pres;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data new;&lt;BR /&gt;
set old;&lt;BR /&gt;
by id bld_pres;&lt;BR /&gt;
if first.id and last.id;&lt;BR /&gt;
run;</description>
    <pubDate>Thu, 17 Dec 2009 17:55:46 GMT</pubDate>
    <dc:creator>Flip</dc:creator>
    <dc:date>2009-12-17T17:55:46Z</dc:date>
    <item>
      <title>select observations</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/select-observations/m-p/32132#M7709</link>
      <description>I have more observations for the same subject, what i want to do is select only subjects with one observetion. How can I do this?&lt;BR /&gt;
dataset is similar to this:&lt;BR /&gt;
id blood pressure&lt;BR /&gt;
1  130&lt;BR /&gt;
2  120&lt;BR /&gt;
3   140&lt;BR /&gt;
3   160&lt;BR /&gt;
3   125&lt;BR /&gt;
4   120&lt;BR /&gt;
4   135&lt;BR /&gt;
4   130&lt;BR /&gt;
&lt;BR /&gt;
i want only subjects with one misuration i.e subject number 1 and 2 in this example&lt;BR /&gt;
thank you</description>
      <pubDate>Thu, 17 Dec 2009 17:25:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/select-observations/m-p/32132#M7709</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-12-17T17:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: select observations</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/select-observations/m-p/32133#M7710</link>
      <description>Hi ,&lt;BR /&gt;
There are several ways of doing it ,&lt;BR /&gt;
For example :&lt;BR /&gt;
&lt;BR /&gt;
data temp;&lt;BR /&gt;
input id blood_pressure;&lt;BR /&gt;
cards;&lt;BR /&gt;
1 130&lt;BR /&gt;
2 120&lt;BR /&gt;
3 140&lt;BR /&gt;
3 160&lt;BR /&gt;
3 125&lt;BR /&gt;
4 120&lt;BR /&gt;
4 135&lt;BR /&gt;
4 130&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
proc sql;&lt;BR /&gt;
create table temp2 as &lt;BR /&gt;
select b.*&lt;BR /&gt;
from(&lt;BR /&gt;
       &lt;BR /&gt;
	select count(id) as count&lt;BR /&gt;
	         ,id&lt;BR /&gt;
	from temp&lt;BR /&gt;
	group by id&lt;BR /&gt;
	having count(id)=1&lt;BR /&gt;
		) as a&lt;BR /&gt;
join temp as b&lt;BR /&gt;
on a.id=b.id;&lt;BR /&gt;
		quit;</description>
      <pubDate>Thu, 17 Dec 2009 17:40:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/select-observations/m-p/32133#M7710</guid>
      <dc:creator>yonib</dc:creator>
      <dc:date>2009-12-17T17:40:57Z</dc:date>
    </item>
    <item>
      <title>Re: select observations</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/select-observations/m-p/32134#M7711</link>
      <description>proc sort;&lt;BR /&gt;
by id bld_pres;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data new;&lt;BR /&gt;
set old;&lt;BR /&gt;
by id bld_pres;&lt;BR /&gt;
if first.id and last.id;&lt;BR /&gt;
run;</description>
      <pubDate>Thu, 17 Dec 2009 17:55:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/select-observations/m-p/32134#M7711</guid>
      <dc:creator>Flip</dc:creator>
      <dc:date>2009-12-17T17:55:46Z</dc:date>
    </item>
  </channel>
</rss>

