calcRanks: (Calibration Performance) Rank Calculation

Description Usage Arguments Value Examples

Description

Calculate rank of data.

Usage

1
2
calcRanks(dat, columnToRank, rank.method = c("ordinal", "interpolated"),
  abs.value = FALSE)

Arguments

dat

A dataframe

columnToRank

A vector of integers defining what columns to rank (independently)

rank.method

A character defining the ranking method to apply. The method can be either 'ordinal' or 'interpolated'.

abs.value

A Boolean vector with length equal to the length of the columnToRank argument. This indicates whether or not to take the absolute value of the data before the ranking. Default value is FALSE.

Value

A dataframe comprising all columns of the argument: dat and one additional column of ranks for each column column declared in columnToRank. The name of each rank column is a combination of the data column name and ".rank".

Examples

1
2
3
4
5
## Not run: 
dat.test <- data.frame(id=1:20, values=rnorm(20))
calcRanks(dat.test,  columnToRank=2, abs.value = TRUE )

## End(Not run)

MichaelFolkes/ctctools documentation built on May 7, 2019, 4:56 p.m.