Fills an empty matrix of the dimensions (nyears, nages, nsexes, nregions, nfleets) with a vector or matrix of values across the specified dimensions. This allows for quicky filling parameter matrices when parameters only vary across a subset of the required dimensions.

generate_param_matrix(
  vals,
  dimension_names,
  by = NA,
  include_fleet_dim = FALSE
)

Arguments

vals

a single value, or a vector or matrix of values, to fill the output matrix with. If a vector or matrix, all dimensions must be named, and names must match with those specified with the `dimension.names` argument

by

a character vector specifying which dimensions the input values correspond to

include_fleet_dim

whether to expand the output matrix to include a 5th dimension, indicating fleet structure

settings

names list containing `model.params` that

Value

a 4d or 5d array of dimensions (nyears, nages, nsexes, nregions, nfleets) filled across the specified dimensions by the specfied values.