<?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: Adding more data through SAS in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Adding-more-data-through-SAS/m-p/557921#M10054</link>
    <description>&lt;P&gt;Where are these hemoglobin values going to come from?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Normally you would not ADD a variable to an existing dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The normal way would be create a dataset that has the data for the new variable and merge the two datasets to make a NEW dataset that has the NEW structure.&amp;nbsp; Make sure both datasets have the proper key variables so the values of hemoglobin are adding into the right observations of the old dataset.&lt;/P&gt;
&lt;P&gt;So for example if your existing data is called HAVE and each row is uniquely identified by the variable PATIENT and you have created a new dataset called HEMOGLOBIN that has the new variable with the hemoglobin values and also has the PATIENT variable then you can make an new dataset called WANT that has all of the data together.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  merge have hemoglobin  ;
  by patient;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 10 May 2019 18:51:09 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2019-05-10T18:51:09Z</dc:date>
    <item>
      <title>Adding more data through SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Adding-more-data-through-SAS/m-p/557888#M10049</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to add more data columns in SAS data. Please help me out.&lt;/P&gt;&lt;P&gt;for example;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have data of 13k patients, there is missing hemoglobin value in the data. How can I add new column which also match to patient's other data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2019 17:00:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Adding-more-data-through-SAS/m-p/557888#M10049</guid>
      <dc:creator>SChander</dc:creator>
      <dc:date>2019-05-10T17:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: Adding more data through SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Adding-more-data-through-SAS/m-p/557902#M10051</link>
      <description>&lt;P&gt;Let us know if this helps!&lt;BR /&gt;&lt;BR /&gt;Creating new columns:&amp;nbsp;&lt;A href="https://go.documentation.sas.com/?docsetId=sqlproc&amp;amp;docsetTarget=p1ju3u1ef9w6pln103et2l56rtsv.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en"&gt;https://go.documentation.sas.com/?docsetId=sqlproc&amp;amp;docsetTarget=p1ju3u1ef9w6pln103et2l56rtsv.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Data Columns:&amp;nbsp;&lt;A href="https://go.documentation.sas.com/?docsetId=proc&amp;amp;docsetTarget=n108rw6boklvmbn1n9fpz9jxwkyj.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en"&gt;https://go.documentation.sas.com/?docsetId=proc&amp;amp;docsetTarget=n108rw6boklvmbn1n9fpz9jxwkyj.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Altering Columns:&amp;nbsp;&amp;nbsp;&lt;A href="https://go.documentation.sas.com/?docsetId=sqlproc&amp;amp;docsetTarget=p0rdzn3mhqxl2zn13uvxkjkt1svq.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en"&gt;https://go.documentation.sas.com/?docsetId=sqlproc&amp;amp;docsetTarget=p0rdzn3mhqxl2zn13uvxkjkt1svq.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2019 17:59:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Adding-more-data-through-SAS/m-p/557902#M10051</guid>
      <dc:creator>SAS_Cares</dc:creator>
      <dc:date>2019-05-10T17:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: Adding more data through SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Adding-more-data-through-SAS/m-p/557921#M10054</link>
      <description>&lt;P&gt;Where are these hemoglobin values going to come from?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Normally you would not ADD a variable to an existing dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The normal way would be create a dataset that has the data for the new variable and merge the two datasets to make a NEW dataset that has the NEW structure.&amp;nbsp; Make sure both datasets have the proper key variables so the values of hemoglobin are adding into the right observations of the old dataset.&lt;/P&gt;
&lt;P&gt;So for example if your existing data is called HAVE and each row is uniquely identified by the variable PATIENT and you have created a new dataset called HEMOGLOBIN that has the new variable with the hemoglobin values and also has the PATIENT variable then you can make an new dataset called WANT that has all of the data together.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  merge have hemoglobin  ;
  by patient;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 10 May 2019 18:51:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Adding-more-data-through-SAS/m-p/557921#M10054</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-05-10T18:51:09Z</dc:date>
    </item>
  </channel>
</rss>

