Description Usage Arguments Details Value Examples
Calculates the Spawning Stock Biomass (SSB) or the total biomass of each species in the model.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | get_SSB(inputs, outputs, ...)
## S4 method for signature 'LeMans_param,LeMans_outputs'
get_SSB(
inputs,
outputs,
species = 1:dim(outputs@N)[2],
time_steps = 1:dim(outputs@N)[3]
)
## S4 method for signature 'LeMans_param,missing'
get_SSB(inputs, N, species = 1:dim(N)[2], time_steps = 1:dim(N)[3])
## S4 method for signature 'missing,LeMans_outputs'
get_SSB(
wgt,
mature,
outputs,
species = 1:dim(outputs@N)[2],
time_steps = 1:dim(outputs@N)[3],
species_names = NULL
)
## S4 method for signature 'missing,missing'
get_SSB(
wgt,
mature,
N,
species = 1:dim(N)[2],
time_steps = 1:dim(N)[3],
species_names = NULL
)
get_biomass(inputs, outputs, ...)
## S4 method for signature 'LeMans_param,LeMans_outputs'
get_biomass(
inputs,
outputs,
species = 1:dim(outputs@N)[2],
time_steps = 1:dim(outputs@N)[3]
)
## S4 method for signature 'LeMans_param,missing'
get_biomass(inputs, N, species = 1:dim(N)[2], time_steps = 1:dim(N)[3])
## S4 method for signature 'missing,LeMans_outputs'
get_biomass(
wgt,
outputs,
species = 1:dim(outputs@N)[2],
time_steps = 1:dim(outputs@N)[3],
species_names = NULL
)
## S4 method for signature 'missing,missing'
get_biomass(
wgt,
N,
species = 1:dim(N)[2],
time_steps = 1:dim(N)[3],
species_names = NULL
)
|
inputs |
A LeMans_param object containing the parameter values of the current LeMans model. |
outputs |
A LeMans_outputs object containing the outputs of the model run. |
... |
Additional arguments. |
species |
A numeric value or vector or a character string or vector of the species that you wish to calculate the mean maximum length. The default is |
time_steps |
A numeric vector of the time steps that you wish to calculate the mean maximum length. The default is |
N |
An array with dimensions |
wgt |
A matrix with dimensions |
mature |
A matrix with dimensions |
species_names |
A character vector of length |
The SSB for each species in species
is equal to:
colSums(N[, species]*wgt[, species]*mature[, species])
.
The biomass for each species in species
is equal to:
colSums(N[, species]*wgt[, species])
If length(species)>1
, get_SSB
returns a matrix with dimensions length(time_steps)
by length(species)
where the i,j
th element is the SSB (g) of the j
th species
in the i
th time_steps
. If length(species)==1
, the function will return a numeric vector of length length(time_steps)
.
If length(species)>1
, get_biomass
returns a matrix with dimensions length(time_steps)
by length(species)
where the i,j
th element is the biomass (g) of the j
th species
in the i
th time_steps
. If length(species)==1
, the function will return a numeric vector of length length(time_steps)
.
1 2 3 4 5 6 7 8 9 10 | # Set up and run the model
NS_params <- LeMansParam(NS_par, tau=NS_tau, eta=rep(0.25, 21), L50=NS_par$Lmat, other=1e12)
effort <- matrix(0.5, 10, dim(NS_params@Qs)[3])
model_run <- run_LeMans(NS_params, years=10, effort=effort)
# Calculate SSB
get_SSB(inputs=NS_params, outputs=model_run)
# Calculate biomass
get_biomass(inputs=NS_params, outputs=model_run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.