cons.rank: Produce consecutive ranks

View source: R/skUtils.R

cons.rankR Documentation

Produce consecutive ranks

Description

Ranks a vector such that ranks are always 1 apart if they succeed each other or 0 apart if they are tied.

Usage

cons.rank(x)

Arguments

x

A numeric vector.

Value

An integer vector of the same length as x.

Author(s)

Sercan Kahveci

Examples


testvec <- c(0,2,3,3,7,9,9,0)
cons.rank(testvec)


Spiritspeak/skMisc documentation built on April 12, 2025, 5:40 a.m.