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 dt

sex

Character argument giving the name of the sex column in dt. Ignored if split.by.sex == FALSE.

time

Split analysis by time? If NULL, all data are assumed to stem from one time point. Using a character argument giving the name of a time column splits the analysis by unique values in that column and produces a faceted plot.

age.range

Defines the age range to be used for Z estimation. If NULL, all ages are used. If a numeric vector of length 2, the first number defines the minimum age to include and the last number the maximum age. It is also possible to use differing ranges by sex when split.by.sex = TRUE: use a named list of length two with names referring to female.sex and male.sex. Provide a numeric vector of length 2 to each element (first number defining the minimum age to include and the last number the maximum age). See Examples.

female.sex, male.sex

A character or integer denoting female and male sex in the sex column of dt, respectively.

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)


[Package ggFishPlots version 0.3.0 Index]