<?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 Manipulate Data Produced from Prob Tabulate in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Manipulate-Data-Produced-from-Prob-Tabulate/m-p/556628#M9863</link>
    <description>&lt;P&gt;I used code to develop a table that essentially tallies the number the count of people in an area in a given hour. I would like the divide the Day of the Week number columns in the table by an arbitrary number. For example, I would like to divide each individual cell (12am to 11pm) in Day of the Week column 1 by 5 (so 140/5, 141/5, 122/5 etc.); for Day of the Week column 2, I would like do to the same to each hour cell but by 4 instead of 5. Is the possible?&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;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 300px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/29248i8D4839F709A2D3B3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ED_TAT2;
   set ED_TAT1;
   counttime = round(checkin_date_time,3600);
   format counttime datetime18.;
   do while (counttime le round(dispo_date_time,3600) );
      hr = timepart(counttime);
      day = weekday(datepart(counttime));
	  date = datepart(counttime);
      output;
      counttime= intnx('hour',counttime,1,'B');
   end;
run;

proc tabulate data=ED_TAT2;
   class hr day;
   format hr timeampm5. ;
   table hr='', day*n='' / box=hr;
   label hr='Hour'
         day= 'Day of week';
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 07 May 2019 02:07:05 GMT</pubDate>
    <dc:creator>gbond21</dc:creator>
    <dc:date>2019-05-07T02:07:05Z</dc:date>
    <item>
      <title>Manipulate Data Produced from Prob Tabulate</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Manipulate-Data-Produced-from-Prob-Tabulate/m-p/556628#M9863</link>
      <description>&lt;P&gt;I used code to develop a table that essentially tallies the number the count of people in an area in a given hour. I would like the divide the Day of the Week number columns in the table by an arbitrary number. For example, I would like to divide each individual cell (12am to 11pm) in Day of the Week column 1 by 5 (so 140/5, 141/5, 122/5 etc.); for Day of the Week column 2, I would like do to the same to each hour cell but by 4 instead of 5. Is the possible?&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;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 300px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/29248i8D4839F709A2D3B3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ED_TAT2;
   set ED_TAT1;
   counttime = round(checkin_date_time,3600);
   format counttime datetime18.;
   do while (counttime le round(dispo_date_time,3600) );
      hr = timepart(counttime);
      day = weekday(datepart(counttime));
	  date = datepart(counttime);
      output;
      counttime= intnx('hour',counttime,1,'B');
   end;
run;

proc tabulate data=ED_TAT2;
   class hr day;
   format hr timeampm5. ;
   table hr='', day*n='' / box=hr;
   label hr='Hour'
         day= 'Day of week';
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2019 02:07:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Manipulate-Data-Produced-from-Prob-Tabulate/m-p/556628#M9863</guid>
      <dc:creator>gbond21</dc:creator>
      <dc:date>2019-05-07T02:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulate Data Produced from Prob Tabulate</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Manipulate-Data-Produced-from-Prob-Tabulate/m-p/556653#M9869</link>
      <description>&lt;P&gt;Something like ths perhaps?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ED_TAT2;
   set ED_TAT1;
   counttime = round(checkin_date_time,3600);
   format counttime datetime18.;
   do while (counttime le round(dispo_date_time,3600) );
      hr = timepart(counttime);
      day = weekday(datepart(counttime));
	  date = datepart(counttime);
      weight = 1/choosen(day, 5, 4, 3, 2, 1, 1, 1);
      output;
      counttime= intnx('hour',counttime,1,'B');
   end;
run;

proc tabulate data=ED_TAT2;
   class hr day;
   var weight;
   format hr timeampm5. ;
   table hr='', day*sum=''*weight='' / box=hr;
   label hr='Hour'
         day= 'Day of week';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 07 May 2019 03:37:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Manipulate-Data-Produced-from-Prob-Tabulate/m-p/556653#M9869</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-05-07T03:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulate Data Produced from Prob Tabulate</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Manipulate-Data-Produced-from-Prob-Tabulate/m-p/556907#M9915</link>
      <description>&lt;P&gt;Amazing, works perfectly!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Somewhat new to SAS, are you aware a good resource where I can learn how your answer works, for example-I want to figure out how ' weight = 1/choosen(day, 5, 4, 4, 4, 4, 5, 5)' and 'days*sum=''*weight=''' work their magic.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2019 18:24:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Manipulate-Data-Produced-from-Prob-Tabulate/m-p/556907#M9915</guid>
      <dc:creator>gbond21</dc:creator>
      <dc:date>2019-05-07T18:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulate Data Produced from Prob Tabulate</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Manipulate-Data-Produced-from-Prob-Tabulate/m-p/556925#M9917</link>
      <description>&lt;P&gt;There is no magic. It's all in the SAS documentation&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CHOOSEN function&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p0et55hpbrn2vln14mmqrhzffs64.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p0et55hpbrn2vln14mmqrhzffs64.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC TABULATE; TABLE statement&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=proc&amp;amp;docsetTarget=p1g617vn5t3p39n0z9o601rw74jz.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?docsetId=proc&amp;amp;docsetTarget=p1g617vn5t3p39n0z9o601rw74jz.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2019 19:43:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Manipulate-Data-Produced-from-Prob-Tabulate/m-p/556925#M9917</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-05-07T19:43:21Z</dc:date>
    </item>
  </channel>
</rss>

