View source: R/plotting-precision.R
| add_decision_overlay | R Documentation |
Overlays the output of decide_sample_size() as a step-line
on a contour plot (e.g. from plot_power_contour()).
add_decision_overlay(p, decisions, x_effect = NULL, colour = "red")
p |
A ggplot object, typically from |
decisions |
A data.frame or tibble returned by
|
x_effect |
Name of the effect column to use on the x-axis.
If |
colour |
Colour for the overlay line (default "red"). |
If the decisions contain multiple effect-grid columns, the
overlay is aggregated over all effect columns except x_effect
by taking the worst-case (maximum) recommended n at each value
of x_effect.
A ggplot object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.