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

rank.integer64

Sample Ranks from integer64


Description

Returns the sample ranks of the values in a vector. Ties (i.e., equal values) are averaged and missing values propagated.

Usage

## S3 method for class 'integer64'
rank(x, method = NULL, ...)

Arguments

x

a integer64 vector

method

NULL for automatic method selection or a suitable low-level method, see details

...

ignored

Details

This function automatically chooses from several low-level functions considering the size of x and the availability of a cache. Suitable methods are sortorderrnk (fast ordering) and orderrnk (memory saving ordering).

Value

A numeric vector of the same length as x.

Author(s)

Jens Oehlschlägel <Jens.Oehlschlaegel@truecluster.com>

See Also

order.integer64, rank and prank for percent rank.

Examples

x <- as.integer64(sample(c(rep(NA, 9), 1:9), 32, TRUE))
rank.integer64(x)

stopifnot(identical(rank.integer64(x),  rank(as.integer(x)
, na.last="keep", ties.method = "average")))

bit64

A S3 Class for Vectors of 64bit Integers

v4.0.5
GPL-2 | GPL-3
Authors
Jens Oehlschlägel [aut, cre], Leonardo Silvestri [ctb]
Initial release
2020-08-29

We don't support your browser anymore

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