<?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: generate all values between min &amp;amp; max in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/generate-all-values-between-min-amp-max/m-p/762582#M30373</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/262848"&gt;@LFern&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I have:&lt;/P&gt;
&lt;PRE&gt;data have;&lt;BR /&gt;input country $6. min max ;&lt;BR /&gt;datalines;&lt;BR /&gt;Canada 495 507&lt;BR /&gt;Haiti 10 15&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/PRE&gt;
&lt;P&gt;I want either of these versions (they're substantively the same but one is long-format and the other is wide-format):&lt;/P&gt;
&lt;P&gt;Wide format:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="want1.PNG" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/62738i8F20F8ABC4B296D6/image-size/large?v=v2&amp;amp;px=999" role="button" title="want1.PNG" alt="want1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Long format:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="want2.PNG" style="width: 224px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/62737i3B352427D71644E4/image-size/large?v=v2&amp;amp;px=999" role="button" title="want2.PNG" alt="want2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any suggestions?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;PRE&gt;data want;
  set have;
  do in_range=min to max;
     output;
  end;
  keep country in_range;
run;&lt;/PRE&gt;
&lt;P&gt;If you want the "wide" version you could use proc transpose but can't see any real advantage to that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have to assume you wanted the integer versions. "All values", in a mathematical sense, is an infinite number of values regardless of the range.&lt;/P&gt;</description>
    <pubDate>Thu, 19 Aug 2021 16:08:27 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2021-08-19T16:08:27Z</dc:date>
    <item>
      <title>generate all values between min &amp; max</title>
      <link>https://communities.sas.com/t5/New-SAS-User/generate-all-values-between-min-amp-max/m-p/762580#M30372</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have:&lt;/P&gt;&lt;PRE&gt;data have;&lt;BR /&gt;input country $6. min max ;&lt;BR /&gt;datalines;&lt;BR /&gt;Canada 495 507&lt;BR /&gt;Haiti 10 15&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/PRE&gt;&lt;P&gt;I want either of these versions (they're substantively the same but one is long-format and the other is wide-format):&lt;/P&gt;&lt;P&gt;Wide format:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="want1.PNG" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/62738i8F20F8ABC4B296D6/image-size/large?v=v2&amp;amp;px=999" role="button" title="want1.PNG" alt="want1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Long format:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="want2.PNG" style="width: 224px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/62737i3B352427D71644E4/image-size/large?v=v2&amp;amp;px=999" role="button" title="want2.PNG" alt="want2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 15:59:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/generate-all-values-between-min-amp-max/m-p/762580#M30372</guid>
      <dc:creator>LFern</dc:creator>
      <dc:date>2021-08-19T15:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: generate all values between min &amp; max</title>
      <link>https://communities.sas.com/t5/New-SAS-User/generate-all-values-between-min-amp-max/m-p/762582#M30373</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/262848"&gt;@LFern&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I have:&lt;/P&gt;
&lt;PRE&gt;data have;&lt;BR /&gt;input country $6. min max ;&lt;BR /&gt;datalines;&lt;BR /&gt;Canada 495 507&lt;BR /&gt;Haiti 10 15&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/PRE&gt;
&lt;P&gt;I want either of these versions (they're substantively the same but one is long-format and the other is wide-format):&lt;/P&gt;
&lt;P&gt;Wide format:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="want1.PNG" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/62738i8F20F8ABC4B296D6/image-size/large?v=v2&amp;amp;px=999" role="button" title="want1.PNG" alt="want1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Long format:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="want2.PNG" style="width: 224px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/62737i3B352427D71644E4/image-size/large?v=v2&amp;amp;px=999" role="button" title="want2.PNG" alt="want2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any suggestions?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;PRE&gt;data want;
  set have;
  do in_range=min to max;
     output;
  end;
  keep country in_range;
run;&lt;/PRE&gt;
&lt;P&gt;If you want the "wide" version you could use proc transpose but can't see any real advantage to that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have to assume you wanted the integer versions. "All values", in a mathematical sense, is an infinite number of values regardless of the range.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 16:08:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/generate-all-values-between-min-amp-max/m-p/762582#M30373</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-08-19T16:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: generate all values between min &amp; max</title>
      <link>https://communities.sas.com/t5/New-SAS-User/generate-all-values-between-min-amp-max/m-p/762587#M30375</link>
      <description>&lt;P&gt;oh gosh this is so simple and clean! I was working through loops and arrays for no reason. Thank you so much!&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 16:26:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/generate-all-values-between-min-amp-max/m-p/762587#M30375</guid>
      <dc:creator>LFern</dc:creator>
      <dc:date>2021-08-19T16:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: generate all values between min &amp; max</title>
      <link>https://communities.sas.com/t5/New-SAS-User/generate-all-values-between-min-amp-max/m-p/762594#M30378</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/262848"&gt;@LFern&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;oh gosh this is so simple and clean! I was working through loops and arrays for no reason. Thank you so much!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If you were doing that to attempt a wide solution then you see why wide is very frequently not a good idea.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 16:43:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/generate-all-values-between-min-amp-max/m-p/762594#M30378</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-08-19T16:43:21Z</dc:date>
    </item>
  </channel>
</rss>

