
Reduce structure-factorial curves to one trajectory per cell
growth_structure_cell_curves.RdA structure run's curves carry one row per (cell, timestep, COHORT), because the design they are joined against is per cohort. The biomass column is a WHOLE-CELL total either way, so a two-cohort cell arrives with its trajectory repeated and any naive aggregation counts it twice.
Usage
growth_structure_cell_curves(curves, biomass = c("cell", "cohort"))Arguments
- curves
A tibble of structure-run curves, carrying at least
batch,map_code,species,cohort_age,ageandaboveground_c_mg_ha. An optionalvariantcolumn is carried through.- biomass
What
aboveground_c_mg_haMEANS, which differs by extension and cannot be detected from the data."cell"(the default) is a whole-cell total already, repeated once per cohort by the join, and is de-duplicated."cohort"is that cohort's own biomass and is SUMMED over the cell's cohorts. Getting this wrong is quiet: de-duplicating per-cohort values keeps one row per DISTINCT VALUE, which is neither a total nor a trajectory.
Value
A tibble with batch, map_code, age, aboveground_c_mg_ha,
n_cohorts, composition (a display label, counted: Hw for one cohort,
Hw x3 for three), species_set (the species present, for matching) and
start_age (the oldest cohort the cell begins with).
Details
This reduces to one row per (cell, timestep) and attaches the cell's
composition: how many cohorts it carries and which modelled species, as a
+-separated label ordered OLDEST cohort first, so that A+B and B+A
are different mixtures rather than the same one.
See also
Other growth calibration helpers:
extract_landscape_cohort_structures(),
growth_add_objective(),
growth_auto_window(),
growth_best_candidates(),
growth_bin_observations(),
growth_calibration_design(),
growth_calibration_partition(),
growth_calibration_work_root(),
growth_climatic_distance(),
growth_climatic_weight(),
growth_expand_over_pseudo_species(),
growth_factorial_ratio_grid(),
growth_fitting_windows(),
growth_identifiability(),
growth_inflation_factor(),
growth_mortality_onset_frac(),
growth_plot_palette(),
growth_pseudo_species_name(),
growth_reference_curves(),
growth_reference_inflection(),
growth_score_fit(),
growth_scoring_for(),
growth_smooth_observations(),
growth_structure_cohort_table(),
growth_structure_design(),
growth_structure_summary(),
growth_window_for(),
plot_growth_calibration(),
plot_growth_candidate(),
plot_growth_factorial_sensitivity(),
plot_growth_structures(),
read_growth_scoring(),
read_landscape_cohort_structures(),
scale_linetype_growth_reference(),
write_growth_review_bundle()