View source: R/split-by-maturity.R
split_catch_maturity | R Documentation |
Split catch densities by mass ratio of maturity classes
split_catch_maturity(
survey_sets,
fish,
split_dens_type = "density_kgpm2",
survey = c("SYN HS", "SYN QCS", "SYN WCVI", "SYN WCHG"),
years = NULL,
cutoff_quantile = 0.9995,
p_threshold = 0.5,
use_median_ratio = TRUE,
sample_id_re = TRUE,
year_re = FALSE,
plot = FALSE
)
survey_sets |
Data from |
fish |
Data from |
split_dens_type |
Which density type will be split and saved as a column providing units for adult_density and imm_density columns. |
survey |
List of survey abbreviations. |
years |
List of years. Default 'NULL' includes all years. |
cutoff_quantile |
Set max cutoff quantile for mass modeled from lengths. |
p_threshold |
Probability of maturity to split at. Default = 0.5. Alternatives are 0.05 or 0.95. |
use_median_ratio |
If TRUE, uses median proportion mature (if FALSE uses mean proportion mature) when catch too small to have biological samples collected. |
sample_id_re |
If |
year_re |
Option to have lengths at maturity vary by year, but this requires the gfvelocities package. |
plot |
Logical for whether to produce plots (length-weight and length-at-maturity relationships). |
## 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_maturity(
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.