my_rank: my_rank

Description Usage Arguments Value Examples

View source: R/my_package.R

Description

Simulate the function 'rank()' in the 'base' package to give the rank of each element in the vector

Usage

1

Arguments

x

A numeric vector

Value

A vector with average rank of each element of input x

Examples

1
2
my_rank(rnorm(100))
my_rank(c(4,3,3,8,-1,4,7,5,4,4,3,0))   ## The average rank of ties would return correspondingly to the tied elements.

kangpingy/rank.test documentation built on Dec. 7, 2019, 12:19 p.m.