The quantile rank of a number in a vector is the relative position of ranking resulted from rank divided by the length of vector.

qrank(x, ...)

Arguments

x

a vector

...

additional parameters passed to rank()

See also

Examples

qrank(mtcars$mpg)
#>  [1] 0.609375 0.609375 0.765625 0.671875 0.468750 0.437500 0.125000 0.812500
#>  [9] 0.765625 0.515625 0.406250 0.343750 0.375000 0.234375 0.046875 0.046875
#> [17] 0.156250 0.968750 0.921875 1.000000 0.718750 0.281250 0.234375 0.093750
#> [25] 0.515625 0.875000 0.843750 0.921875 0.312500 0.562500 0.187500 0.671875