Plots Mean Maximum Length (MML), the Large Fish Indicator (LFI), Typical Length (TyL) and the Length Quantiles (LQ) of the whole community or a subset of the species.
plot_indicators(inputs, outputs, ...)# S4 method for LeMans_param,LeMans_outputs
plot_indicators(inputs, outputs, species, time_steps, prob, length_LFI, ...)
# S4 method for LeMans_param,missing
plot_indicators(inputs, N, species, time_steps, prob, length_LFI, ...)
# S4 method for missing,LeMans_outputs
plot_indicators(
wgt,
mid,
l_bound,
u_bound,
Linf,
species,
outputs,
time_steps,
species_names = NULL,
prob,
length_LFI,
...
)
# S4 method for missing,missing
plot_indicators(
wgt,
mid,
l_bound,
u_bound,
Linf,
N,
species,
time_steps,
species_names = NULL,
prob,
length_LFI,
MML,
TyL,
LFI,
LQ,
units = "cm",
...
)
plot_LFI(inputs, outputs, ...)
# S4 method for LeMans_param,LeMans_outputs
plot_LFI(
inputs,
outputs,
species,
time_steps,
species_names,
length_LFI,
LFI,
...
)
# S4 method for LeMans_param,missing
plot_LFI(inputs, N, species, time_steps, species_names, length_LFI, LFI, ...)
# S4 method for missing,LeMans_outputs
plot_LFI(
wgt,
l_bound,
u_bound,
outputs,
species,
time_steps,
species_names,
length_LFI,
LFI,
...
)
# S4 method for missing,missing
plot_LFI(
wgt,
l_bound,
u_bound,
N,
species,
time_steps,
species_names,
length_LFI,
LFI,
units = "cm",
...
)
plot_MML(inputs, outputs, ...)
# S4 method for LeMans_param,LeMans_outputs
plot_MML(inputs, outputs, species, species_names, time_steps, MML, ...)
# S4 method for LeMans_param,missing
plot_MML(inputs, N, species, time_steps, species_names, MML, ...)
# S4 method for missing,LeMans_outputs
plot_MML(wgt, Linf, outputs, species, time_steps, species_names, MML, ...)
# S4 method for missing,missing
plot_MML(
wgt,
Linf,
N,
species,
time_steps,
species_names,
MML,
units = "cm",
...
)
plot_TyL(inputs, outputs, ...)
# S4 method for LeMans_param,LeMans_outputs
plot_TyL(inputs, outputs, species, time_steps, species_names, TyL, ...)
# S4 method for LeMans_param,missing
plot_TyL(inputs, N, species, time_steps, species_names, TyL, ...)
# S4 method for missing,LeMans_outputs
plot_TyL(wgt, mid, outputs, species, time_steps, species_names, TyL, ...)
# S4 method for missing,missing
plot_TyL(
wgt,
mid,
N,
species,
time_steps,
species_names,
TyL,
units = "cm",
...
)
plot_LQ(inputs, outputs, ...)
# S4 method for LeMans_param,LeMans_outputs
plot_LQ(inputs, outputs, species, time_steps, species_names, LQ, prob, ...)
# S4 method for LeMans_param,missing
plot_LQ(inputs, N, species, species_names, time_steps, LQ, prob, ...)
# S4 method for missing,LeMans_outputs
plot_LQ(
wgt,
u_bound,
outputs,
species,
time_steps,
species_names,
LQ,
prob,
...
)
# S4 method for missing,missing
plot_LQ(
wgt,
u_bound,
N,
species,
time_steps,
species_names,
LQ,
prob,
units = "cm",
...
)
Additional arguments.
A numeric value or vector or a character string or vector denoting the species to be used to calculate the indicators. This option is only required if MML
, LFI
, TyL
and LQ
are not provided. The default is 1:dim(N)[2]
.
A numeric vector denoting the time steps to be used to calculate and/or plot the indicators. The default is 1:dim(N)[3]
or 1:length(indicator)
.
A numeric value or vector between 0 and 1 denoting the LQ(s) to be calculated. This option is only required if LQ
is not provided. The default is 0.5
.
A numeric value or vector representing the threshold(s) to be used to calculate the LFI. This option is only required if LFI
is not provided. The default is 40
.
An array with dimensions nsc
, nfish
and tot_time
representing the number of individuals in each length class for each time step, where nsc
represents the number of length classes in the model, nfish
represents the number of species in the model and tot_time
represents the number of time steps that the model was run for. This option is only required if outputs
or MML
, LFI
, TyL
and LQ
are not provided.
A matrix with dimensions nsc
and nfish
representing the weight of each species in each length class. This option is only required if inputs
or MML
, LFI
, TyL
and LQ
are not provided.
A numeric vector of length nfish
representing the mid-point of the length classes in the model, where nfish
represents the number of species in the model. This option is only required if inputs
or TyL
are not provided.
A numeric vector of length nsc
representing the lower bounds of the length classes, where nsc
represents the number of length classes in the model. This option is only required if inputs
or LFI
are not provided.
A numeric vector of length nsc
representing the upper bounds of the length classes, where nsc
represents the number of length classes in the model. This option is only required if inputs
, LFI
and/or LQ
are not provided.
A numeric vector of length nfish
representing the asymptotic length of each species, where nfish
represents the number of species in the model. This option is only required if inputs
or MML
are not provided.
A character vector of length 1:dim(N)[2]
that denotes the names of the species in the model. This option is only required if inputs
is not provided.
A numeric vector representing the outputs of the function get_MML()
. This option is only required if inputs
and outputs
are not provided.
A numeric vector representing the outputs of the function get_TyL()
. This option is only required if inputs
and outputs
are not provided.
A numeric vector or matrix representing the outputs of the function get_LFI()
. This option is only required if inputs
and outputs
are not provided.
A numeric vector or matrix representing the outputs of the function get_LQ()
. This option is only required if inputs
and outputs
are not provided.
A character string denoting the units of length used in the model. The default is "cm"
.
plot_indicators
returns a set of four line plots depicting changes in the MML, LFI, TyL and LQ(s) of the community (including only the selected species) over time.
plot_LFI
returns a line plot depicting the LFI of the community (including only the selected species) over time.
plot_MML
returns a line plot depicting the MML of the community (including only the selected species) over time.
plot_TYL
returns a line plot depicting the TyL of the community (including only the selected species) over time.
plot_LQ
returns a line plot depicting the LQ(s) of the community (including only the selected species) over time.
# NOT RUN {
# 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 the indicators
tmp <- get_indicators(NS_params, model_run)
MML <- tmp$MML
LFI <- tmp$LFI
TyL <- tmp$TYL
LQ <- tmp$LQ
# Plot the indicators
plot_indicators(MML=MML, LFI=LFI, TyL=TyL, LQ=LQ)
# Plot the LFI
plot_LFI(LFI=LFI)
# Plot MML
plot_MML(MML=MML)
# Plot the TyL
plot_TyL(TyL=TyL)
# Plot the LQs
plot_LQ(LQ=LQ)
# }
Run the code above in your browser using DataLab