Takes a ggplot object that contains a GeomRoc layer and returns a string that contains html suitable for creating a standalone interactive ROC curve plot.
export_interactive_roc(
ggroc_p,
add.cis = TRUE,
hide.points = FALSE,
prefix = "a",
width = 6,
height = 6,
omit.js = FALSE,
style = style_roc(theme = theme_grey()),
...
)
A character object containing the html necessary to plot the ROC curve in a web browser
A ggplot object with a GeomRoc layer and optionally a GeomRocci layer as returned by geom_roc and/or geom_rocci. It can be modified with annotations, themes, etc.
Logical, if true, removes the current confidence interval layer (if present) and replaces it with a denser layer of confidence regions
Logical, if true, hides points layer so that points with cutoff values are only visible when hovering. Recommended for plots containing more than 3 curves.
A string to assign to the objects within the svg. Enables unique identification by the javascript code
Width and height in inches of plot
Logical. If true, omit inclusion of javascript source in output. Useful for documents with multiple interactive plots
A call to the function style_roc
Other arguments passed to geom_rocci when add.cis =
TRUE
If you intend to include more than one of these objects in a single
page, use a different prefix
string for each one. To use this
function in knitr, use the chunk options fig.keep='none'
and
results = 'asis'
, then cat()
the resulting string to the
output. See the vignette for examples. Older browsers (< IE7) are not
supported.