RankTieC

Prototype

Matrix RankTieC( Matrix m )

Return Value

The return value is a matrix whose elements are the ranks of the corresponding elements of m. The ranks of tied values are averaged.

Parameters

Matrix m
A character matrix or literal.

Remarks

This function behaves like the built-in SAS/IML RANKTIE function except that RankTieC computes the ranks of a character matrix instead of a numeric matrix. Note that uppercase letters precede lowercase letters in the ASCII order, so if you want to compare mixed-case strings, you may want to call ranktiec( upcase( m ) ).

Example
m = { "it" "was" "the", "best"  "of" "times",
      "it" "was" "the", "worst" "of" "times" };
r = ranktiec( m );
print r;
See Also

RankC