Learn R Programming

permimp (version 1.1-0)

ranks: Reversed Rankings

Description

Method for giving the reversed rankings of the numerical values of a vector or VarImp object.

Usage

ranks(x, note = TRUE, ...)
# S3 method for default
ranks(x, note = TRUE, ...)
# S3 method for VarImp
ranks(x, note = TRUE, ...)

Value

A vector containing the reversed rankings.

Arguments

x

an object to be reverse ranked.

note

a logical specifying whether the (reversed) rankings should be printed instead of the importance values.

...

additional arguments to be passed to rank.

Details

The ranks function is nothing more than (length(x) - rank(x, ...) + 1L). But it also works for objects of class VarImp.

Examples

Run this code
  ## High Jump data
  HighJumps <- c(Anna = 1.45, Betty = 1.53, Cara = 1.37, Debby = 1.61, 
                 Emma = 1.29, Hanna = 1.44, Juno = 1.71)
  HighJumps
  ## ranking of high jump data
  ranks(HighJumps)

Run the code above in your browser using DataLab