Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Rank

Ranks of the values of a vector


Description

Ranks of the values of a vector.

Usage

Rank(x,method = "average",descending = FALSE)

Arguments

x

A numerical vector with data.

method

a character string for choosing method. Must be one of "average", "min", "max".

descending

A boolean value (TRUE/FALSE) for sorting the vector in descending order. By default sorts the vector in ascending.

Details

The ranks of the values are returned, the same job as "rank". If you want you can choose descending/ascending order for all methods.

Value

A vector with the ranks of the values.

Author(s)

Manos Papadakis

R implementation and documentation: Manos Papadakis <papadakm95@gmail.com>.

See Also

Examples

x <- rnorm(100)
a1 <- Rank(x)
a2 <- rank(x)

Rfast

A Collection of Efficient and Extremely Fast R Functions

v2.0.1
GPL (>= 2.0)
Authors
Manos Papadakis, Michail Tsagris, Marios Dimitriadis, Stefanos Fafalios, Ioannis Tsamardinos, Matteo Fasiolo, Giorgos Borboudakis, John Burkardt, Changliang Zou, Kleanthi Lakiotaki and Christina Chatzipantsiou.
Initial release
2020-09-13

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.