export_interactive_roc: Generate svg code for an ROC curve object. Includes necessary styling and
Javascript code
Description
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 examplesUsage
export_interactive_roc(ggroc_p, cutoffs, font.size = "12px", prefix = "a",
width = 6, height = 6)
Arguments
ggroc_p
An object as returned by ggroc. It can be modified with
annotations, themes, etc. cutoffs
Vector of cutoff values
font.size
Character string that determines font size of cutoff labels
prefix
A string to assign to the objects within the svg. Enables
unique idenfication by the javascript code
width
Width in inches of plot
height
Height in inches of plot
Value
- A string containing the svg code necessary to plot the ROC curve in a
web browser