Learn R Programming

plotROC (version 1.3.3)

ggroc: Plot an ROC curve

Description

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

Usage

ggroc(rocdata, fpf_string = "FPF", tpf_string = "TPF", c_string = "c",
  ci = FALSE, label = NULL, label.adj.x = 0, label.adj.y = 0,
  label.angle = 45, plotmath = FALSE, xlabel = "False positive fraction",
  ylabel = "True positive fraction")

Arguments

rocdata
Data frame containing true and false positive fractions, and cutoff values
fpf_string
Column name identifying false positive fraction column
tpf_string
Column name identifying true positive fraction column
c_string
Column name identifying cutoff values
ci
Logical, if TRUE will create invisible confidence regions for use in the interactive plot
label
Optional direct label for the ROC curve
label.adj.x
Adjustment for the horizontal positioning of the label
label.adj.y
Adjustment for the vertical positioning of the label
label.angle
Adjustment for angle of label
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