rows ( x ) | m ← match ( x i, Sorted ) Rank i ← mean ( m ) Rank
RankData ( x ) : = | Sorted ← reverse ( sort ( x ) ) for i ∈ 1. Thus the intensity of 3.7 cm/hr is given the rank of 1.Ĭreate a function to rank the data. The intensity of 3.7 cm/hr is found in the 1st element only. Thus the intensity of 1.7 cm/hr is given the rank of 27. For example the intensity of 1.7 cm/hr is found in the 25th, 26th, 27th, 28th, and 29th element. The rank is mean of the indeces corresponding to the given rainfall intensity. Finally, compute the ranks of the data, sorted in this way.
Then reverse the sort so the data is sorted from largest to smallest.
The sort function sorts from smallest to largest. We need to compute the corresponding rank of each intensity with the largest one getting the lowest rank. ⋅ cm hr Step 2: Sort data and assign a rank