Preformatted reference line
reference_line(
plot,
dat,
era = "time",
label_name,
reference,
relative = FALSE,
scale_amount = 1
)a ggplot2 object where the reference line will be added
standard data frame where reference point should be extracted
a string naming the era of data such as historical ("early"), current ("time"), or projected ("fore") data if filtering should occur. Default is set to "time" which is the current time. To plot all data, set era to NULL.
string of the name of the quantity that users want to extract the reference point from
string. name of the reference point such as "msy", "unfished", or "target"
A logical value specifying if the resulting figures should be relative spawning biomass. The default is `FALSE`. `ref_line` indicates which reference point to use.
A number describing how much to scale down the quantities shown on the y axis. For example, scale_amount = 100 would scale down a value from 500,000 –> 5,000. This scale will be reflected in the y axis label.
a ggplot2 geom_hline object for a reference point that can be added to a plot
if (FALSE) { # \dontrun{
reference_line(dat, "biomass", "msy")
} # }