<?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: SAS Programming 1: Essential Lesson4: p104p04 in Programming 1 and 2</title>
    <link>https://communities.sas.com/t5/Programming-1-and-2/SAS-Programming-1-Essential-Lesson4-p104p04/m-p/769980#M976</link>
    <description>Is Acres 648,960 or 4928 in the original data set?&lt;BR /&gt;Are you sure you're using the correct input data set?</description>
    <pubDate>Thu, 23 Sep 2021 17:11:30 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2021-09-23T17:11:30Z</dc:date>
    <item>
      <title>SAS Programming 1: Essential Lesson4: p104p04</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/SAS-Programming-1-Essential-Lesson4-p104p04/m-p/769972#M974</link>
      <description>&lt;PRE&gt;&lt;SPAN&gt;Open&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;p104p04.sas&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;from the&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;practices&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;folder.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;UL&gt;&lt;LI&gt;Create a new column named&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;SqMiles&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;by multiplying&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Acres&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;by .0015625.&lt;/LI&gt;&lt;LI&gt;Create a new column named&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Camping&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;as the sum of&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;OtherCamping&lt;/STRONG&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;TentCampers&lt;/STRONG&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;RVCampers&lt;/STRONG&gt;, and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;BackcountryCampers&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;Format&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;SqMiles&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Camping&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to include commas and zero decimal places.&lt;/LI&gt;&lt;LI&gt;Modify the KEEP statement to include the new columns.&lt;/LI&gt;&lt;LI&gt;Submit the program.&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;I tried the following codes but I am getting different answers.&lt;BR /&gt;&lt;BR /&gt;data np_summary_update;
    set pg1.np_summary;
    keep Reg ParkName DayVisits OtherLodging Acres &lt;STRONG&gt;SqMiles Camping&lt;/STRONG&gt;;
    &lt;STRONG&gt;SqMiles=Acres*.0015625;&lt;/STRONG&gt;
    &lt;STRONG&gt;Camping=sum(OtherCamping,TentCampers,
                RVCampers,BackcountryCampers);&lt;/STRONG&gt;
    &lt;STRONG&gt;format SqMiles comma6. Camping comma10.;&lt;/STRONG&gt;
run;&lt;BR /&gt;&lt;BR /&gt;So, the question is and the answers in the answerkey are: &lt;STRONG&gt;SqMiles&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;1,014&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;and&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Camping&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;6,375&lt;/EM&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;and my answers are: SqMile 77 and Camping 201,741&lt;BR /&gt;I copied and pasted the codes from the answer key and still geting the same results (77, 201741). I did not sort the data in anyway nor the question asked to sort the data.&lt;BR /&gt;Did anyone else had the same issue?&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Sep 2021 16:57:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/SAS-Programming-1-Essential-Lesson4-p104p04/m-p/769972#M974</guid>
      <dc:creator>Catherine18</dc:creator>
      <dc:date>2021-09-23T16:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Programming 1: Essential Lesson4: p104p04</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/SAS-Programming-1-Essential-Lesson4-p104p04/m-p/769973#M975</link>
      <description>&lt;P&gt;You can check the validity of your code quite easily, by doing the calculation yourself with the values found in the dataset. After all, it's just one multiplication and adding of 4 values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the dataset is the result of an earlier task of yours, go back there to see if you calculate the correct values there.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2021 17:17:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/SAS-Programming-1-Essential-Lesson4-p104p04/m-p/769973#M975</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-09-23T17:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Programming 1: Essential Lesson4: p104p04</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/SAS-Programming-1-Essential-Lesson4-p104p04/m-p/769980#M976</link>
      <description>Is Acres 648,960 or 4928 in the original data set?&lt;BR /&gt;Are you sure you're using the correct input data set?</description>
      <pubDate>Thu, 23 Sep 2021 17:11:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/SAS-Programming-1-Essential-Lesson4-p104p04/m-p/769980#M976</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-09-23T17:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Programming 1: Essential Lesson4: p104p04</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/SAS-Programming-1-Essential-Lesson4-p104p04/m-p/769982#M977</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; My guess is that somehow the original dataset, pg1.np_summary got corrupted or lost rows. When you run a PROC CONTENTS on pg1.np_summary, you should see 135 observations or rows and 10 columns or variables, as shown in the PROC CONTENTS output below:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1632416717019.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/63993iFEBF644AA9440ACD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1632416717019.png" alt="Cynthia_sas_0-1632416717019.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another way to check is to look in your log. You should see something like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_1-1632416766884.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/63994i6B8160BC54B266C7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_1-1632416766884.png" alt="Cynthia_sas_1-1632416766884.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; If you have anything OTHER than 135 as the number of observations for pg1.np_summary, then it is a good idea to re-run the data creation program again to refresh the data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; When I run the program against the data with 135 observations, the first observation is for the ParkName value of &lt;STRONG&gt;Cape Krusenstern National Monument&lt;/STRONG&gt; the SqMiles value is &lt;STRONG&gt;1,014&lt;/STRONG&gt; and the Camping value is &lt;STRONG&gt;6,375&lt;/STRONG&gt; . Please go back to the Course Overview instructions and re-run the program to re-create the data for the class. The answer key is correct and it seems like something happened to your data, perhaps accidentally that changed pg1.np_summary.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2021 17:13:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/SAS-Programming-1-Essential-Lesson4-p104p04/m-p/769982#M977</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2021-09-23T17:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Programming 1: Essential Lesson4: p104p04</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/SAS-Programming-1-Essential-Lesson4-p104p04/m-p/770001#M978</link>
      <description>I am getting a total of 135 observations and it's unsorted. I have 7 variables since I dropped a couple of them. I am not sure what went wrong but I will try re-creating the data. Thanks!&lt;BR /&gt;</description>
      <pubDate>Thu, 23 Sep 2021 18:13:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/SAS-Programming-1-Essential-Lesson4-p104p04/m-p/770001#M978</guid>
      <dc:creator>Catherine18</dc:creator>
      <dc:date>2021-09-23T18:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Programming 1: Essential Lesson4: p104p04</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/SAS-Programming-1-Essential-Lesson4-p104p04/m-p/770003#M979</link>
      <description>I am positive that I am using the correct data (unless it got corrupted somehow) because I copied and pasted the codes from the answer key and I am getting the same results as my code's output. This is my first row:&lt;BR /&gt;Reg ParkName DayVisits Other Acres SqMiles Camping&lt;BR /&gt;1 NE Acadia National Park 3,303,393 0 49,057.36 77 201,741</description>
      <pubDate>Thu, 23 Sep 2021 18:17:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/SAS-Programming-1-Essential-Lesson4-p104p04/m-p/770003#M979</guid>
      <dc:creator>Catherine18</dc:creator>
      <dc:date>2021-09-23T18:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Programming 1: Essential Lesson4: p104p04</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/SAS-Programming-1-Essential-Lesson4-p104p04/m-p/770004#M980</link>
      <description>The calculations are correct but it has multiple rows and the question is about the first row. I am getting the exact set of results somewhere at the bottom but not in the first row. So I think it is some sorting issue. But, I did not sort the data neither the question asked to sort it.</description>
      <pubDate>Thu, 23 Sep 2021 18:21:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/SAS-Programming-1-Essential-Lesson4-p104p04/m-p/770004#M980</guid>
      <dc:creator>Catherine18</dc:creator>
      <dc:date>2021-09-23T18:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Programming 1: Essential Lesson4: p104p04</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/SAS-Programming-1-Essential-Lesson4-p104p04/m-p/770005#M981</link>
      <description>&lt;P&gt;I tried re-uploading the data and now I am getting correct results. Thanks,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&amp;nbsp;and everyone!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2021 18:31:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/SAS-Programming-1-Essential-Lesson4-p104p04/m-p/770005#M981</guid>
      <dc:creator>Catherine18</dc:creator>
      <dc:date>2021-09-23T18:31:16Z</dc:date>
    </item>
  </channel>
</rss>

