Learn R Programming

COINr (version 1.1.14)

n_prank: Normalise using percentile ranks

Description

Calculates percentile ranks of a numeric vector using "sport" ranking. Ranks are calculated by base::rank() and converted to percentile ranks. The ties.method can be changed - this is directly passed to base::rank().

Usage

n_prank(x, ties.method = "min")

Value

Numeric vector

Arguments

x

A numeric vector

ties.method

This argument is passed to base::rank() - see there for details.

Examples

Run this code
x <- runif(20)
n_prank(x)

Run the code above in your browser using DataLab