View source: R/make_spawners.R
make_spawners | R Documentation |
The purpose of this function is to create an age-structured spawning population from an existing age-structured population by applying region- and age-specific spawning probabilities.
make_spawners(pop, probs)
pop |
Numeric vector containing age-structured spawner abundance. |
probs |
Numeric vector of spawning probabilities. May be a single value
or multiple. If multiple values are passed as a vector, the length of
|
A numeric vector of length = length(pop)
# Example usage
## Not run:
# Population vital rates
max_age = 9
nM = 0.38
fM = 0.00
n_init = 1e5
# Simulate a fish population at stable age distribution
pop = make_pop(max_age = max_age,
nM = nM,
fM = fM,
n_init = n_init)
# Spawners ----
# Define probability of recruitment to spawn- probability of
# recruitment to the first spawning event
# by age class (Bailey and Zydlewski 2013)
### This is using probability of first spawn.
### clearly does not work here because it will always
### result in the oldest age classes having the most fish
spawnRecruit <- c(0, 0, 0, 0.01, .33, .84, .97, .99, 1.00)
# Get spawner numbers
spawners <- make_spawners(pop, probs = spawnRecruit)
spawners
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.