Preformatted reference line

reference_line(plot, dat, label_name, reference, scale_amount = 1, lbs = FALSE)

Arguments

plot

a ggplot2 object where the reference line will be added

dat

standard data frame where reference point should be extracted

label_name

string of the name of the quantity that users want to extract the reference point from

reference

string of the reference point

Options: Including, but not limited to: "msy", "unfished", "target"

scale_amount

A number to scale the y-axis values.

Default: 1

lbs

A logical value indicating whether to convert the y-axis values from kilograms to pounds. The default units match the default in the unit_label argument - 'mt'.

Default: `FALSE`

Value

A ggplot2 geom_hline object for a reference point that can be added to a plot

Examples

if (FALSE) { # \dontrun{
reference_line(dat, "biomass", "msy")
} # }