finalN: Size spectra at end of simulation

View source: R/MizerSim-class.R

finalNR Documentation

Size spectra at end of simulation

Description

Size spectra at end of simulation

Usage

finalN(sim)

finalNResource(sim)

idxFinalT(sim)

Arguments

sim

A MizerSim object

Value

For finalN(): An array (species x size) holding the consumer number densities at the end of the simulation

For finalNResource(): A vector holding the resource number densities at the end of the simulation for all size classes

For idxFinalT(): An integer giving the index for extracting the results for the final time step

Examples

str(finalN(NS_sim))

# This could also be obtained using `N()` and `idxFinalT()`
identical(N(NS_sim)[idxFinalT(NS_sim), , ], finalN(NS_sim))
str(finalNResource(NS_sim))
idx <- idxFinalT(NS_sim)
idx
# This coincides with
length(getTimes(NS_sim))
# and corresponds to the final time
getTimes(NS_sim)[idx]
# We can use this index to extract the result at the final time
identical(N(NS_sim)[idx, , ], finalN(NS_sim))
identical(NResource(NS_sim)[idx, ], finalNResource(NS_sim))

mizer documentation built on Oct. 17, 2024, 9:07 a.m.