<?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 do I replace single observations? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-replace-single-observations/m-p/685720#M208013</link>
    <description>&lt;P&gt;"Observation" in SAS-speak is an entire "row of data" , "record" or similar. You want to change the value of a variable in specific observations, not "replace an observation".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Sep 2020 14:35:37 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-09-22T14:35:37Z</dc:date>
    <item>
      <title>How do I replace single observations?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-replace-single-observations/m-p/685713#M208010</link>
      <description>&lt;P&gt;I want to replace single observations in a dataset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a var whose obs I want to change. Fir example each time my var =10, I want to replace it with 15 or another number or my choosing. How do I do this?'&lt;/P&gt;&lt;P&gt;I used to be able to do this with modify and replace statements, but have forgotten how to do it.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 14:27:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-replace-single-observations/m-p/685713#M208010</guid>
      <dc:creator>K_S</dc:creator>
      <dc:date>2020-09-22T14:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do I replace single observations?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-replace-single-observations/m-p/685715#M208011</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
    set have;
    if x1=10 then x1=15;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 Sep 2020 14:28:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-replace-single-observations/m-p/685715#M208011</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-09-22T14:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: How do I replace single observations?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-replace-single-observations/m-p/685720#M208013</link>
      <description>&lt;P&gt;"Observation" in SAS-speak is an entire "row of data" , "record" or similar. You want to change the value of a variable in specific observations, not "replace an observation".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 14:35:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-replace-single-observations/m-p/685720#M208013</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-09-22T14:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do I replace single observations?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-replace-single-observations/m-p/685722#M208015</link>
      <description>&lt;P&gt;I prefer the SQL approach.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc sql;
  update have
    set x1=15
   where x1=10;
quit;&lt;/PRE&gt;
&lt;P&gt;One advantage is it will work if the data in not in a SAS dataset.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 14:36:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-replace-single-observations/m-p/685722#M208015</guid>
      <dc:creator>CurtisMackWSIPP</dc:creator>
      <dc:date>2020-09-22T14:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: How do I replace single observations?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-replace-single-observations/m-p/685723#M208016</link>
      <description>&lt;P&gt;If you really want to use the modify/replace style, my old paper should help.&amp;nbsp;&amp;nbsp;&lt;A title="MODIFY® The Most Under-Appreciated of the Data Step File Handling Statements" href="https://www.lexjansen.com/pnwsug/2008/CurtisMack-Modify.pdf" target="_self"&gt;https://www.lexjansen.com/pnwsug/2008/CurtisMack-Modify.pdf&lt;/A&gt;&amp;nbsp;.&amp;nbsp; It is overkill for this case though.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 14:39:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-replace-single-observations/m-p/685723#M208016</guid>
      <dc:creator>CurtisMackWSIPP</dc:creator>
      <dc:date>2020-09-22T14:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: How do I replace single observations?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-replace-single-observations/m-p/685728#M208018</link>
      <description>&lt;P&gt;In the poster's defense, I they were thinking of the modify/replace syntax in which you must replace the entire record to change a single value.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 15:12:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-replace-single-observations/m-p/685728#M208018</guid>
      <dc:creator>CurtisMackWSIPP</dc:creator>
      <dc:date>2020-09-22T15:12:30Z</dc:date>
    </item>
  </channel>
</rss>

