Description Usage Arguments Details Value Author(s) See Also Examples
Calculates mean ranks where some ranks may be missing
1  | 
x | 
 A matrix of ranks that may contain ties and NAs. Objects ranked are assumed to be columns and ranking methods rows.  | 
allranks | 
 An optional list of all ranks that might have been made.  | 
labels | 
 Optional labels for the ranks.  | 
rankx | 
 Whether to convert competition ranks, or any other set of numeric values, into the usual mean rankings for ties.  | 
meanranks calls muranks to complete the rank matrix before calculating the mean ranks for each column if there are any NAs in x.
Note that cats2ranks interprets each value in x as a nominal level variable and its index as the rank, while meanranks interprets values as ordinal level (ranks). Thus if a matrix or data frame of category labels is passed to meanranks, it will not give the correct mean ranks.
A list with the following components:
ranks | 
 x with any NAs replaced by the mean of unallocated ranks for each row.  | 
labels | 
 The vector of labels, defaulting to the integers 1:allranks.  | 
mean.ranks | 
 A vector of mean ranks for each value of allranks.  | 
Jim Lemon
muranks, rank, cats2ranks
1 2 3 4 5 6 7 8 9 10 11 12  | 
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    8    3    2    9    5   NA    4    1   NA    10
 [2,]   NA   NA   10    3    4    5    8    9    1     2
 [3,]    8    2    1   10   NA   NA   NA    9   NA    NA
 [4,]    1   NA   NA   10    2    9   NA    6    8     7
 [5,]   NA    1   NA   NA    9    2   NA   10   NA     3
 [6,]   NA   NA    3   NA   NA   10   NA   NA    1     2
 [7,]    1   NA   10   NA   NA    2    3   NA    9     4
 [8,]   NA   10   NA   NA   NA    2    9   NA    1    NA
 [9,]    3   NA   10    9    4    1   NA    2    7     8
[10,]    1    8    9    7    4    3    2   10   NA    NA
	Mean rank
6	4.55
1	4.65
9	5
5	5.15
10	5.2
2	5.3
7	5.3
3	6.05
8	6.55
4	7.25
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.