Calculates the number of individuals within user-defined size limits, for each time and each species in the MizerSim object. The default option is to use the whole size range. You can specify minimum and maximum weight or lengths for the species. Lengths take precedence over weights (i.e. if both min_l and min_w are supplied, only min_l will be used)

getN(sim, ...)

Arguments

sim

An object of class MizerSim.

...

Arguments passed on to get_size_range_array

min_w

Smallest weight in size range. Defaults to smallest weight in the model.

max_w

Largest weight in size range. Defaults to largest weight in the model.

min_l

Smallest length in size range. If supplied, this takes precedence over min_w.

max_l

Largest length in size range. If supplied, this takes precedence over max_w.

Value

An array containing the total numbers (time x species)

See also

Other summary functions: getBiomass(), getDiet(), getGrowthCurves(), getSSB(), getYieldGear(), getYield()

Examples

if (FALSE) { data(NS_species_params_gears) data(inter) params <- newMultispeciesParams(NS_species_params_gears, inter) # With constant fishing effort for all gears for 20 time steps sim <- project(params, t_max = 20, effort = 0.5) getN(sim) getN(sim, min_w = 10, max_w = 1000) }