Learn R Programming

plotROC (version 1.3.3)

multi_ggroc: Plot multiple ROC curves

Description

Given a list of results computed by calculate_roc, plot the curve using ggplot with sensible defaults. Pass the resulting object and data to export_interactive_roc, plot_interactive_roc, or plot_journal_roc.

Usage

multi_ggroc(datalist, fpf_string = rep("FPF", length(datalist)),
  tpf_string = rep("TPF", length(datalist)), c_string = rep("c",
  length(datalist)), label = NULL, legend = FALSE, label.adj.x = rep(0,
  length(datalist)), label.adj.y = rep(0, length(datalist)),
  label.angle = rep(45, length(datalist)), plotmath = FALSE,
  xlabel = "False positive fraction", ylabel = "True positive fraction")

Arguments

datalist
List of data frames each containing true and false positive fractions and cutoffs
fpf_string
Column names identifying false positive fraction
tpf_string
Column names identifying true positive fraction
c_string
Column names identifying cutoff values
label
Optional vector of direct labels for the ROC curve, same length as datalist
legend
If true, draws legend instead of labels
label.adj.x
Adjustment for the positioning of the label, same length as datalist
label.adj.y
Adjustment for the positioning of the label, same length as datalist
label.angle
Adjustment for angle of label, same length as datalist
plotmath
Logical. If TRUE, labels will be parsed as expressions. See ?plotmath for details.
xlabel
Defaults to "False positive fraction"
ylabel
Defaults to "True positive fraction"

Value

  • A ggplot object