Learn R Programming

exactRankTests (version 0.8-36)

irank: Integer Ranks

Description

Compute the number of elements less or equal the elements in a given vector.

Usage

irank(x, ox = NULL)

Value

A vector of integers.

Arguments

x

a numeric vector.

ox

order(x), optionally (for efficiency in case order(x) is already known).

Examples

Run this code
x <- rnorm(10)
irank(x)
rank(x)
x <- c(1,2,3,3,0)
irank(x)
rank(x)

Run the code above in your browser using DataLab