plot_catchcurve {ggFishPlots} | R Documentation |
Plot catch curve
Description
Plot a catch curve to estimate instantaneous total mortality (Z) using age data
Usage
plot_catchcurve(
dt,
age = "age",
sex = "sex",
time = NULL,
age.range = NULL,
female.sex = "F",
male.sex = "M",
split.by.sex = FALSE,
base_size = 8,
legend.position = "bottom"
)
Arguments
dt |
A data.frame, tibble or data.table |
age |
Character argument giving the name of the age column in |
sex |
Character argument giving the name of the sex column in |
time |
Split analysis by time? If |
age.range |
Defines the age range to be used for Z estimation. If |
female.sex , male.sex |
A character or integer denoting female and male sex in the |
split.by.sex |
Logical indicating whether the result should be split by sex. |
base_size |
Base size parameter for ggplot. See ggtheme. |
legend.position |
Position of the ggplot legend as a character. See ggtheme. |
Details
Calculates and plots the basic log-linearized catch curve to estimate instantaneous mortality. See e.g. Ogle (2013).
Author(s)
Mikko Vihtakari // Institute of Marine Research.
Examples
# Catch curve including all ages
data(survey_ghl)
plot_catchcurve(survey_ghl)
# Specific ages
plot_catchcurve(survey_ghl, age.range = c(10,26))
# Split by sex
plot_catchcurve(survey_ghl, age.range = c(10,26), split.by.sex = TRUE)
# Split by sex, separate age.range
plot_catchcurve(survey_ghl,
age.range = list("F" = c(13,26), "M" = c(10,26)),
split.by.sex = TRUE)