Description Usage Arguments Details Author(s) References See Also Examples

Plots a a vertical line at x up to max of y1 and y2, then horizontal from this line at y1 and y2. Intended for plotting on a plotRisk.

1 | ```
plotOptimalLine(x, y1, y2, pr = NULL, colour = "plum", label = NULL)
``` |

`x` |
location of vertical line. |

`y1` |
location of one horizontal line. |

`y2` |
location of other horizontal line. |

`pr` |
Aprint a percentage at this point. |

`colour` |
of the line. |

`label` |
at bottom of line. |

Intended to plot an optimal line on a Risk Chart as plotted by plotRisk.

Package home page: https://rattle.togaware.com

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ```
## this is usually used in the context of the plotRisk function
## Not run: ev <- evaluateRisk(predicted, actual, risk)
## imitate this output here
ev <- NULL
ev$Caseload <- c(1.0, 0.8, 0.6, 0.4, 0.2, 0)
ev$Precision <- c(0.15, 0.18, 0.21, 0.25, 0.28, 0.30)
ev$Recall <- c(1.0, 0.95, 0.80, 0.75, 0.5, 0.0)
ev$Risk <- c(1.0, 0.98, 0.90, 0.77, 0.30, 0.0)
## plot the Risk Chart
plotRisk(ev$Caseload, ev$Precision, ev$Recall, ev$Risk,
chosen=60, chosen.label="Pr=0.45")
## plot the optimal point
plotOptimalLine(40, 77, 75, colour="maroon")
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.