rankNumber: Give the Rank Number

Description Usage Arguments Details Value

Description

Give the rank number to input numeric vector, the same rank number to the same value.

Usage

1
rankNumber(vector, decreasing = TRUE)

Arguments

vector

numeric, the vector will be sorted and given the rank number

decreasing

logical, default is TRUE, used in function sort

Details

For the same value in an ordered vector, the rank number should be the same, the next value will be given its right ranking number, like, 1, 2, 3, 3, 5...

Value

The rank vector of input.


baixueyuan/pryrk documentation built on May 11, 2019, 5:26 p.m.