Time index at end of simulation

idxFinalT(sim)

Arguments

sim

A MizerSim object

Value

An integer giving the index for extracting the results for the final time step

Examples

idx <- idxFinalT(NS_sim)
idx
#> [1] 44
# This coincides with
length(getTimes(NS_sim))
#> [1] 44
# and corresponds to the final time
getTimes(NS_sim)[idx]
#> [1] 2010
# We can use this index to extract the result at the final time
identical(N(NS_sim)[idx, , ], finalN(NS_sim))
#> [1] TRUE
identical(NResource(NS_sim)[idx, ], finalNResource(NS_sim))
#> [1] TRUE