<?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: Combinations and permutations in sas in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Combinations-and-permutations-in-sas/m-p/147192#M38979</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Combination is 21. Permutation a lot big number, as order matters. Check out corresponding the SAS functions . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P id="bookpage"&gt;&lt;/P&gt;&lt;DIV class="refDictEntry"&gt;&lt;DIV class="exampleBlock"&gt;&lt;DIV class="paragraph"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;_null_&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; comb=comb(&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;7&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;5&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; perm=perm(&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;7&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;5&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;put&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; comb=/ perm=;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Jun 2014 19:55:55 GMT</pubDate>
    <dc:creator>Haikuo</dc:creator>
    <dc:date>2014-06-18T19:55:55Z</dc:date>
    <item>
      <title>Combinations and permutations in sas</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Combinations-and-permutations-in-sas/m-p/147191#M38978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to generate code that takes 7 playing cards and generates every combination of 5 cards from those 7. Is there a simple way to do this? I think there are 42 different combinations.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2014 19:28:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Combinations-and-permutations-in-sas/m-p/147191#M38978</guid>
      <dc:creator>brophymj</dc:creator>
      <dc:date>2014-06-18T19:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: Combinations and permutations in sas</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Combinations-and-permutations-in-sas/m-p/147192#M38979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Combination is 21. Permutation a lot big number, as order matters. Check out corresponding the SAS functions . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P id="bookpage"&gt;&lt;/P&gt;&lt;DIV class="refDictEntry"&gt;&lt;DIV class="exampleBlock"&gt;&lt;DIV class="paragraph"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;_null_&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; comb=comb(&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;7&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;5&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; perm=perm(&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;7&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;5&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;put&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; comb=/ perm=;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2014 19:55:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Combinations-and-permutations-in-sas/m-p/147192#M38979</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2014-06-18T19:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: Combinations and permutations in sas</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Combinations-and-permutations-in-sas/m-p/147193#M38980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would expect you will find 21 combinations, rather than 42.&amp;nbsp; Omitting card #3 and card #5 is identical to omitting card #5 and card #3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The logic is similar to your earlier question, but the syntax is more complex.&amp;nbsp; More important, you have to picture what you would like the output to look like.&amp;nbsp; This approach creates 21 observations for each incoming observation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;combination=0;&lt;/P&gt;&lt;P&gt;array cards {7} hand1 hand2 flop1 flop2 flop3 turn river;&lt;/P&gt;&lt;P&gt;do i=1 to 3;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; do j=i+1 to 4;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do k=j+1 to 5;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do l=k+1 to 6;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do m=l+1 to 7;&lt;/P&gt;&lt;P&gt;combination + 1;&lt;/P&gt;&lt;P&gt;card1 = cards{i};&lt;/P&gt;&lt;P&gt;card2 = cards{j};&lt;/P&gt;&lt;P&gt;card3 = cards{k};&lt;/P&gt;&lt;P&gt;card4 = cards{l};&lt;/P&gt;&lt;P&gt;card5 = cards{m};&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;end;end;end;end;end;&lt;/P&gt;&lt;P&gt;drop i j k l m;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Creating COMBINATION is optional.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2014 19:57:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Combinations-and-permutations-in-sas/m-p/147193#M38980</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2014-06-18T19:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: Combinations and permutations in sas</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Combinations-and-permutations-in-sas/m-p/147194#M38981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much Astounding - that's very helpful as was your earliers advice to my other questions. Do you play cards? Seem to know your stuff.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jun 2014 10:10:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Combinations-and-permutations-in-sas/m-p/147194#M38981</guid>
      <dc:creator>brophymj</dc:creator>
      <dc:date>2014-06-19T10:10:57Z</dc:date>
    </item>
  </channel>
</rss>

