Learn R Programming

ROCit (version 2.1.1)

rankorderdata: Rank order data

Description

Function rankorderdata rank-orders the data with respect to some variable (diagnostic variable).

Usage

rankorderdata(score, class, dec = TRUE)

Value

A dataframe, rank-ordered with respect to the score.

Arguments

score

A vector containing (diagnostic) scores.

class

A vector containing the class.

dec

Logical. TRUE for descending order, FALSE for ascending order.

Comment

rankorderdata is used internally in other function(s) of ROCit.

Examples

Run this code
score <- c(0.4 * runif(20) + 0.2, 0.4*runif(20))
class <- c(rep("A",20), rep("B",20))
returndata <- rankorderdata(score, class, dec = FALSE)
returndata

Run the code above in your browser using DataLab