Difference between revisions of "OrdinalRank Command"

From GeoGebra Manual
Jump to: navigation, search
m (Text replace - "<div class="box info"> 48px|left This page is part of the official manual for print and pdf. For structural reasons normal users can't edit this page. If you found any errors on this page please contact )
m (typo)
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<noinclude>{{Manual Page|version=4.2}}</noinclude>
+
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|statistics}}
{{command|statistics}}
+
;OrdinalRank( &lt;List> )
;OrdinalRank[ <List L> ]
+
:Returns a list, whose ''i''-th element is the rank of ''i''-th element of list ''L'' (rank of element is its position in [[Sort Command|Sort]](L)). If there are more equal elements in ''L'' which occupy positions from ''k'' to ''l'' in Sort[L], ranks from ''k'' to ''l'' are associated with these elements.
:Returns a list, whose ''i''-th element is the rank of ''i''-th element of L (rank of element is its position in [[Sort Command|Sort]][L]). If there are more equal elements in L which occupy positions from ''k'' to ''l'' in Sort[L], ranks from ''k'' to ''l'' are associated with these elements.
+
:{{example|1=<div>
{{example|1=<code>OrdinalRank[{4, 1, 2, 3, 4, 2}]</code> returns {5, 1, 2, 4, 6, 3}.}}
+
:*<code>OrdinalRank({4, 1, 2, 3, 4, 2})</code> returns ''{5, 1, 2, 4, 6, 3}''
{{example|1=<code>OrdinalRank[{3, 2, 2, 1}]</code> returns {4, 2, 3, 1}.}}
+
:*<code>OrdinalRank({3, 2, 2, 1})</code> returns ''{4, 2, 3, 1}''</div>}}
 
 
 
{{note|Also see command: [[TiedRank Command|TiedRank]] }}
 
{{note|Also see command: [[TiedRank Command|TiedRank]] }}

Latest revision as of 07:55, 3 July 2018


OrdinalRank( <List> )
Returns a list, whose i-th element is the rank of i-th element of list L (rank of element is its position in Sort(L)). If there are more equal elements in L which occupy positions from k to l in Sort[L], ranks from k to l are associated with these elements.
Example:
  • OrdinalRank({4, 1, 2, 3, 4, 2}) returns {5, 1, 2, 4, 6, 3}
  • OrdinalRank({3, 2, 2, 1}) returns {4, 2, 3, 1}
Note: Also see command: TiedRank
© 2024 International GeoGebra Institute