Skip to contents

Plot an ROC curve

Usage

plot_roc(roc_obj, main = "ROC curve", add = FALSE, ...)

Arguments

roc_obj

A list from roc_auc(). (Older lists with an AUC element instead of auc are accepted.)

main

Plot title.

add

Logical. If TRUE, add the curve to the current plot.

...

Passed to plot or lines.

Value

roc_obj, invisibly.

Examples

truth <- matrix(rbinom(100, 1, 0.3), 10, 10); truth <- truth + t(truth)
plot_roc(roc_auc(matrix(runif(100), 10, 10), truth))