Skip to contents

Apply rank transformation to new data

Usage

rank_new(x, new, ...)

Arguments

x

A vector or matrix to which a rank transformation was applied

new

New data to be ranked againt the old

...

Further arguments to rank()

Examples

x <- rnorm(100)
rank_new(x, 1)
#> [1] 89.90124
rank_new(x, 4)
#> [1] 100
X <- matrix(rnorm(100*5), 100, 5)
rank_new(X, rbind(1:5, -2:2))
#>           [,1]     [,2]      [,3]      [,4]      [,5]
#> [1,] 83.051702 99.03388 100.00000 100.00000 100.00000
#> [2,]  1.549213 14.78565  50.68175  82.51757  96.80011