Skip to contents

[Experimental] The new egg production is set to compensate for the loss of individuals from the smallest size class through growth and mortality. The result should not be modified by density dependence, so this should be used together with the noRDD() function, see example.


constantEggRDI(params, n, e_growth, mort, ...)



A MizerParams object


A matrix of species abundances (species x size).


A two dimensional array (species x size) holding the energy available for growth as calculated by mizerEGrowth().


A two dimensional array (species x size) holding the mortality rate as calculated by mizerMort().




Vector with the value for each species

See also

Other functions calculating density-dependent reproduction rate: BevertonHoltRDD(), RickerRDD(), SheperdRDD(), constantRDD(), noRDD()


# \donttest{
# choose an example params object
params <- NS_params
# We set the reproduction rate functions
params <- setRateFunction(params, "RDI", "constantEggRDI")
params <- setRateFunction(params, "RDD", "noRDD")
# Now the egg density should stay fixed no matter how we fish
sim <- project(params, effort = 10, progress_bar = FALSE)
# To check that indeed the egg densities have not changed, we first construct
# the indices for addressing the egg densities
no_sp <- nrow(params@species_params)
idx <- (params@w_min_idx - 1) * no_sp + (1:no_sp)
# Now we can check equality between egg densities at the start and the end
all.equal(finalN(sim)[idx], initialN(params)[idx])
#> [1] TRUE
# }