Calculates the mean of the final n years of a time series to obtain equilibrium values after model spin-up period.
Details
Calculate Average Output from Model Time Series
This function removes the initial transient period from time series data and calculates the mean of the final n years, providing representative steady-state values. Essential for obtaining equilibrium abundances, growth rates, and other model outputs after the model has reached dynamic equilibrium.
Examples
if (FALSE) { # \dontrun{
# Run ZooMSS model
results <- zoomss_model(input_params, Groups)
# Average final 3 years of abundance data
avg_abundance <- averageTimeSeries(results, "N", n_years = 3)
# Average final 10 years of growth data (default)
avg_growth <- averageTimeSeries(results, "gg")
} # }