project_pop | R Documentation |
Function used to project population forward one time step using vector multiplication.
project_pop(x, age0, nM, fM, max_age, species = c("AMS", "ALE", "BBH"))
x |
A numeric vector containing age-specific abundance at end of year t. |
age0 |
A numeric vector of length one containing number of new recruits at end of year t. |
nM |
Numeric vector of instantaneous natural mortality. |
fM |
Numeric vector of instantaneous fishing mortality. |
max_age |
Numeric indicating maximum age of spawning fish. |
species |
Species for which population dynamics will be simulated.
Choices include American shad ( |
A numeric vector of age-structured abundance in time t + 1.
# Example usage
## Not run:
# Simulate a population
n_init = 1e5
max_age = 13
nM = .505
fM = 0
pop = make_pop(max_age=max_age, nM=nM, fM=fM, n_init=n_init)
# Project one time-step without reproduction
new_pop = project_pop(x=pop, age0=1e5, nM=.505, fM=0, max_age)
# Difference should be about zero
# because age0 - n_init
new_pop - pop
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.