Description Usage Arguments Details Value See Also Examples

A constructor for the `LeMansParam`

class.

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 | ```
LeMansParam(df, gdf, ...)
## S4 method for signature 'ANY,ANY'
LeMansParam(
df,
gdf,
nfish = nrow(df),
nsc = 32,
pred_mu = -2.25,
pred_sigma = 0.5,
other = 1e+12,
bounds = NULL,
calc_phi_min = FALSE,
phi_min = 0.1,
vary_growth = TRUE,
growth_eff = 0.5,
growth_eff_decay = 0.11,
eps = 1e-05,
force_mature = TRUE,
species_names = paste("species", 1:nfish, sep = "_"),
kappa = rep(10, nfish),
tau = matrix(1, nfish, nfish),
rec_fun = rep("hockey-stick", nfish),
recruit_params = list(a = 18.835 - 4.133 * df$Linf, b = rep(1000/nfish, nfish)),
natmort_opt = rep("std_RNM", nfish),
Nmort = rep(0.8, nfish),
prop = rep(3/4, nfish),
curve = rep("logistic", nfish),
catch_species = ((0:(length(curve) - 1))%%nfish) + 1,
max_catchability = rep(1, length(curve)),
gear_name = paste("gear_", 1:length(curve), sep = ""),
custom = NULL,
...
)
## S4 method for signature 'missing,ANY'
LeMansParam(
gdf,
nfish = length(Linf),
nsc = 32,
pred_mu = -2.25,
pred_sigma = 0.5,
other = 1e+12,
bounds = NULL,
calc_phi_min = FALSE,
phi_min = 0.1,
vary_growth = FALSE,
growth_eff = 0.5,
growth_eff_decay = 0.11,
eps = 1e-05,
force_mature = TRUE,
Linf,
k,
W_a,
W_b,
Lmat,
species_names = paste("species", 1:nfish, sep = "_"),
kappa = rep(10, nfish),
tau = matrix(1, nfish, nfish),
rec_fun = rep("hockey-stick", nfish),
recruit_params = list(a = 18.835 - 4.133 * Linf, b = rep(1000/nfish, nfish)),
natmort_opt = rep("std_RNM", nfish),
Nmort = rep(0.8, nfish),
prop = rep(3/4, nfish),
curve = rep("logistic", nfish),
catch_species = ((0:(length(curve) - 1))%%nfish) + 1,
max_catchability = rep(1, length(curve)),
gear_name = paste("gear_", 1:length(curve), sep = ""),
custom = NULL,
...
)
## S4 method for signature 'missing,missing'
LeMansParam(
df,
gdf,
nfish = length(Linf),
nsc = 32,
pred_mu = -2.25,
pred_sigma = 0.5,
other = 1e+12,
bounds = NULL,
calc_phi_min = TRUE,
phi_min = 0.1,
vary_growth = FALSE,
growth_eff = 0.5,
growth_eff_decay = 0.11,
eps = 1e-05,
force_mature = TRUE,
species_names = paste("species", 1:nfish, sep = "_"),
Linf,
k,
W_a,
W_b,
Lmat,
kappa = rep(10, nfish),
tau = matrix(1, nfish, nfish),
rec_fun = rep("hockey-stick", nfish),
recruit_params = list(a = 18.835 - 4.133 * Linf, b = rep(1000/nfish, nfish)),
natmort_opt = rep("std_RNM", nfish),
Nmort = rep(0.8, nfish),
prop = rep(3/4, nfish),
curve = rep("logistic", nfish),
catch_species = ((0:(length(curve) - 1))%%nfish) + 1,
max_catchability = rep(1, length(curve)),
gear_name = paste("gear_", 1:length(curve), sep = ""),
custom = NULL,
...
)
``` |

`df` |
A data frame with |

`gdf` |
A data frame with |

`...` |
Additional arguments for calculating catchability curves. See |

`nfish` |
A numeric value representing the number of fish species in the model. |

`nsc` |
A numeric value representing the number of length classes in the model. |

`pred_mu` |
A numeric value representing the preferred predator-prey mass ratio. |

`pred_sigma` |
A numeric value representing the width of the weight preference function. |

`other` |
A numeric value representing the amount of other food (g) available from prey that is not explicitly represented in the model. The default is |

`bounds` |
An optional argument specifying the bounds of the length classes. |

`calc_phi_min` |
A logical statement indicating whether |

`phi_min` |
A fixed numeric value of |

`vary_growth` |
A logical statement indicating whether growth efficiency should vary for each species ( |

`growth_eff` |
If |

`growth_eff_decay` |
A numeric value specifying the rate at which growth efficiency decreases as length increases to |

`eps` |
A numeric value specifying a numerical offset. The default value is |

`force_mature` |
A logical statement indicating whether to force maturity for all fish in the largest length class. The default is |

`species_names` |
A numeric or character vector of length |

`kappa` |
A numeric vector of length |

`tau` |
A matrix with dimensions |

`rec_fun` |
A character vector representing the stock recruitment function to be applied to each species. The default value is |

`recruit_params` |
A list object of length |

`natmort_opt` |
A character vector of length |

`Nmort` |
A numeric vector of length |

`prop` |
A numeric vector of length |

`curve` |
A character vector of almost any length describing the type of curve to be used to determine the catchability of each species by fishing gear. By default, |

`catch_species` |
A numeric value or character string describing the species to apply the catchability curve to. |

`max_catchability` |
A numeric vector of length |

`gear_name` |
A character vector of the same length as |

`custom` |
An array with dimensions |

`Linf` |
A numeric vector of length |

`k` |
k A numeric vector of length |

`W_a` |
A numeric vector representing the parameter |

`W_b` |
A numeric vector representing the parameter |

`Lmat` |
A numeric vector of length |

Converts objects of class data frame or vector to class LeMansParams for use in the LeMans model. `Linf`

, `W_a`

, `W_b`

, `k`

and `Lmat`

are required as either a data frame or as vectors.

An object of class `LeMansParam`

for use in the LeMans model.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ```
# To run the model with all inputs specified explicitly:
# Set up species-specific parameters
Linf <- NS_par$Linf # the von-Bertalanffy asymptotic length of each species (cm).
W_a <- NS_par$W_a # length-weight conversion parameter.
W_b <- NS_par$W_b # length-weight conversion parameter.
k <- NS_par$k # the von-Bertalnaffy growth parameter.
Lmat <- NS_par$Lmat # the length at which 50% of individuals are mature (cm).
NS_params <- LeMansParam(species_names=NS_par$species_names, Linf=Linf, k=k, W_a=W_a, W_b=W_b,
Lmat=Lmat, tau=NS_tau, recruit_params=list(a=NS_par$a, b=NS_par$b), eta=rep(0.25, 21), L50=Lmat,
other=NS_other)
###############################################
# Alternatively:
NS_params <- LeMansParam(NS_par, tau=NS_tau, eta=rep(0.25, 21), L50=NS_par$Lmat, other=NS_other)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.