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

prank

(P)ercent (Rank)s


Description

Function prank.integer64 projects the values [min..max] via ranks [1..n] to [0..1]. qtile.integer64 is the inverse function of 'prank.integer64' and projects [0..1] to [min..max].

Usage

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

Arguments

x

a integer64 vector

method

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

...

ignored

Details

Function prank.integer64 is based on rank.integer64.

Value

prank returns a numeric vector of the same length as x.

Author(s)

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

See Also

rank.integer64 for simple ranks and qtile for the inverse function quantiles.

Examples

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

x <- x[!is.na(x)]
stopifnot(identical(x,  unname(qtile(x, probs=prank(x)))))

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.