plot_indicators: Plot indicators

Description Usage Arguments Value See Also Examples

Description

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.

Usage

  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
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
plot_indicators(inputs, outputs, ...)

## S4 method for signature 'LeMans_param,LeMans_outputs'
plot_indicators(inputs, outputs, species, time_steps, prob, length_LFI, ...)

## S4 method for signature 'LeMans_param,missing'
plot_indicators(inputs, N, species, time_steps, prob, length_LFI, ...)

## S4 method for signature '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 signature '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 signature 'LeMans_param,LeMans_outputs'
plot_LFI(
  inputs,
  outputs,
  species,
  time_steps,
  species_names,
  length_LFI,
  LFI,
  ...
)

## S4 method for signature 'LeMans_param,missing'
plot_LFI(inputs, N, species, time_steps, species_names, length_LFI, LFI, ...)

## S4 method for signature 'missing,LeMans_outputs'
plot_LFI(
  wgt,
  l_bound,
  u_bound,
  outputs,
  species,
  time_steps,
  species_names,
  length_LFI,
  LFI,
  ...
)

## S4 method for signature '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 signature 'LeMans_param,LeMans_outputs'
plot_MML(inputs, outputs, species, species_names, time_steps, MML, ...)

## S4 method for signature 'LeMans_param,missing'
plot_MML(inputs, N, species, time_steps, species_names, MML, ...)

## S4 method for signature 'missing,LeMans_outputs'
plot_MML(wgt, Linf, outputs, species, time_steps, species_names, MML, ...)

## S4 method for signature 'missing,missing'
plot_MML(
  wgt,
  Linf,
  N,
  species,
  time_steps,
  species_names,
  MML,
  units = "cm",
  ...
)

plot_TyL(inputs, outputs, ...)

## S4 method for signature 'LeMans_param,LeMans_outputs'
plot_TyL(inputs, outputs, species, time_steps, species_names, TyL, ...)

## S4 method for signature 'LeMans_param,missing'
plot_TyL(inputs, N, species, time_steps, species_names, TyL, ...)

## S4 method for signature 'missing,LeMans_outputs'
plot_TyL(wgt, mid, outputs, species, time_steps, species_names, TyL, ...)

## S4 method for signature 'missing,missing'
plot_TyL(
  wgt,
  mid,
  N,
  species,
  time_steps,
  species_names,
  TyL,
  units = "cm",
  ...
)

plot_LQ(inputs, outputs, ...)

## S4 method for signature 'LeMans_param,LeMans_outputs'
plot_LQ(inputs, outputs, species, time_steps, species_names, LQ, prob, ...)

## S4 method for signature 'LeMans_param,missing'
plot_LQ(inputs, N, species, species_names, time_steps, LQ, prob, ...)

## S4 method for signature 'missing,LeMans_outputs'
plot_LQ(
  wgt,
  u_bound,
  outputs,
  species,
  time_steps,
  species_names,
  LQ,
  prob,
  ...
)

## S4 method for signature 'missing,missing'
plot_LQ(
  wgt,
  u_bound,
  N,
  species,
  time_steps,
  species_names,
  LQ,
  prob,
  units = "cm",
  ...
)

Arguments

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 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].

time_steps

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).

prob

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.

length_LFI

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.

N

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.

wgt

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.

mid

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.

l_bound

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.

u_bound

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.

Linf

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.

species_names

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.

MML

A numeric vector representing the outputs of the function get_MML(). This option is only required if inputs and outputs are not provided.

TyL

A numeric vector representing the outputs of the function get_TyL(). This option is only required if inputs and outputs are not provided.

LFI

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.

LQ

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.

units

A character string denoting the units of length used in the model. The default is "cm".

Value

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.

See Also

get_indicators

Examples

 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
# 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)

LeMaRns documentation built on Dec. 9, 2019, 5:09 p.m.