| plot_roc_cac | R Documentation |
plot() methods for the objects returned by the ROC and CAC functions,
so that plot(x) works directly rather than requiring the user to know
which plot builder matches which object.
## S3 method for class 'lineup_roc_data'
plot(x, ...)
## S3 method for class 'lineup_roc'
plot(x, ...)
## S3 method for class 'lineup_cac_data'
plot(x, ...)
## S3 method for class 'lineup_cac'
plot(x, ...)
## S3 method for class 'lineup_fullroc_data'
plot(x, ...)
## S3 method for class 'lineup_fullroc'
plot(x, ...)
x |
An object returned by one of the ROC or CAC functions listed above. |
... |
Additional arguments passed to the underlying plot builder. |
Each ROC/CAC analysis comes in two forms. The *_data() function
computes and returns the data only; the function without the suffix wraps it,
builds the plot, and returns a classed object with the plot stored in
$plot:
make_rocdata / make_roc
make_cacdata / make_cac
make_fullroc_data / make_fullroc
These methods accept either form. When a plot has already been built it is
returned as-is; otherwise it is constructed with the matching builder
(make_roc_gg, make_cac_gg or
plot_fullroc).
The value is an ordinary ggplot object, so it can be modified with the usual
+ syntax, e.g. plot(x) + ggplot2::theme_minimal().
A ggplot2 object.
data(lineup_example)
plot(make_rocdata(lineup_example))
plot(make_cacdata(lineup_example))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.