Skip to contents

Derives each species' window with growth_auto_window(), optionally caps it from above, then applies any explicit age_min / age_max from growth_scoring.csv. Blank cells keep the derived value, so the hand-maintained file only ever has to record DEPARTURES from what the data implies.

Usage

growth_fitting_windows(
  references,
  species_core,
  scoring = NULL,
  mort_shp = NULL,
  caps = NULL,
  cap_label = "cap",
  ...
)

Arguments

references

Named list of reference tables, one per species.

species_core

A tibble with species and longevity.

scoring

A tibble from read_growth_scoring(), or NULL.

mort_shp

Per-species MortalityCurve: a named numeric vector, or a data frame with species and mort_shp. Supplying it makes each window close at that species' own onset of age-related mortality rather than at a single fraction shared by every species; see growth_auto_window(). A species missing from it falls back to senescence_frac.

caps

Optional tibble with species and cap_age, an upper bound on mature_to – e.g. the age at which an in-use reference curve plateaus, beyond which it carries no shape left to fit. Species absent from it are left alone.

cap_label

Character. The window_source value recorded for a species whose window caps actually shortened.

...

Passed to growth_auto_window().

Value

A tibble with species, mature_from, mature_to, longevity, inflection and window_source.

Details

The three sources are applied in increasing order of authority: derived, then caps, then scoring. A hand-set bound is a constraint rather than a preference, so it wins over a cap; window_source reports which one the returned window came from.