<?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 Ranking in opposite order in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Ranking-in-opposite-order/m-p/41436#M24189</link>
    <description>&lt;P&gt;Is there any way to use the Ranking function, but where the largest value gets assigned a 1? For example:&lt;/P&gt;&lt;P&gt;The code below, returns [3, 5, 4, 1, 2]. However, I would like it to return [3, 1, 2, 5, 4]&lt;/P&gt;&lt;P&gt;Ranking( [3, 6, 5, 0, 1] );&lt;/P&gt;</description>
    <pubDate>Mon, 03 Jul 2017 15:04:51 GMT</pubDate>
    <dc:creator>matt7109</dc:creator>
    <dc:date>2017-07-03T15:04:51Z</dc:date>
    <item>
      <title>Ranking in opposite order</title>
      <link>https://community.jmp.com/t5/Discussions/Ranking-in-opposite-order/m-p/41436#M24189</link>
      <description>&lt;P&gt;Is there any way to use the Ranking function, but where the largest value gets assigned a 1? For example:&lt;/P&gt;&lt;P&gt;The code below, returns [3, 5, 4, 1, 2]. However, I would like it to return [3, 1, 2, 5, 4]&lt;/P&gt;&lt;P&gt;Ranking( [3, 6, 5, 0, 1] );&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2017 15:04:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Ranking-in-opposite-order/m-p/41436#M24189</guid>
      <dc:creator>matt7109</dc:creator>
      <dc:date>2017-07-03T15:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking in opposite order</title>
      <link>https://community.jmp.com/t5/Discussions/Ranking-in-opposite-order/m-p/41442#M24192</link>
      <description>&lt;P&gt;Here is a quick and dirty way to do it&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
a = [3, 6, 5, 0, 1];
Show( Ranking( (Max( a ) + 1) - a; ) );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Ranking((Max(a) + 1) - a) = [3, 1, 2, 5, 4];&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2017 15:58:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Ranking-in-opposite-order/m-p/41442#M24192</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-07-03T15:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking in opposite order</title>
      <link>https://community.jmp.com/t5/Discussions/Ranking-in-opposite-order/m-p/41448#M24194</link>
      <description>&lt;P&gt;I very much like Jim's solution. But I am lazy so I put the matrix&amp;nbsp;and the list to work and make them carry the heavy load.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;x = J( 10, 1, Random Normal() );

Reverse Rank = Function( { x }, { ranks },
	ranks = Rank( x );
	Matrix( Reverse( As List( ranks ) ) );
);

rev rank = Reverse Rank( x );

Show( x, rev rank );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 03 Jul 2017 19:07:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Ranking-in-opposite-order/m-p/41448#M24194</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2017-07-03T19:07:59Z</dc:date>
    </item>
  </channel>
</rss>

