RANK {CLAST}R Documentation

Produces ranks of entries of vector

Description

An alternative to the function rank (which replaces ties by average rank). This function instead gives each tied value the same rank. The output will have the same length as x but contain integer values from 1 to length(unique(x)).

Usage

RANK(x)

Arguments

x

a numeric vector

Value

Vector of integer ranks of the same length as x.

Author(s)

Chris J. Lloyd

Examples

x=c(5,4,4,7,6)
rank(x)
# 3.0 1.5 1.5 5.0 4.0
RANK(x)
# 2 1 1 4 3

[Package CLAST version 1.0.1 Index]