View source: R/split-by-sex-maturity.R
split_catch_by_sex | R Documentation |
Split catch weights by relative weight or counts sampled for sex and/or maturity
split_catch_by_sex(
survey_sets,
fish,
catch_variable = "catch_weight",
split_by_sex = TRUE,
split_by_maturity = TRUE,
immatures_pooled = FALSE,
survey = NULL,
years = NULL,
min_sample_number = 10,
prioritize_time = NULL,
cutoff_quantile = 0.9995,
p_threshold = 0.5,
use_median_ratio = FALSE,
sample_id_re = TRUE,
year_re = FALSE,
split_by_weight = FALSE,
custom_maturity_at = NULL,
custom_length_thresholds = NULL,
plot = FALSE
)
survey_sets |
Data from |
fish |
Data from |
catch_variable |
Which biomass variable will be split. Can be total weight or densities. Variable by this name will be saved indicating which was used. |
split_by_sex |
Should catch be split by sex? |
split_by_maturity |
Should catch be split by maturity? |
immatures_pooled |
If split by maturity, |
survey |
List of survey abbreviations. Default |
years |
List of years. Default |
min_sample_number |
If fewer sets sampled than this threshold, or fewer fish sampled than 3x this value,
the proportion for unsampled sets will be based on either all other years of the survey,
or other surveys in the same year, depending on |
prioritize_time |
Default |
cutoff_quantile |
Set max cutoff quantile for weight modelled from lengths. |
p_threshold |
Probability of maturity to split at. Default = |
use_median_ratio |
If |
sample_id_re |
If |
year_re |
Option to have lengths at maturity vary by year. |
split_by_weight |
Default is |
custom_maturity_at |
A numeric vector of two threshold codes to define
maturity at with the first being for males and the second for females.
Defaults to |
custom_length_thresholds |
Instead of estimating length at maturity, they can be provided as a vector
of length 2, first being for males and the second for females. Defaults to |
plot |
Logical for whether to produce plots. |
## Not run:
d_survey_sets <- gfdata::get_survey_sets("pacific cod")
d_survey_samples <- gfdata::get_survey_samples("pacific cod")
d_by_maturity <- split_catch_by_sex(
d_survey_sets, d_survey_samples,
survey = c("SYN HS", "SYN QCS"),
years = NULL,
plot = TRUE
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.