Internal helper that populates the estimate and se slots of
several energy components inside a budget result list. Avoids repeating the
same assignment pattern across population, individual, and TMB branches of
get_energy_budget_uncertainty().
assign_energy_components(budget, src, mapping, idx = NULL)The updated budget list.
Named list with one sub-list per energy component, each
containing at least estimate and se slots.
Named list (or data frame column) that holds the raw
<prefix>_est / <prefix>_se values.
Named character vector mapping component names (keys) to
source field prefixes (values), e.g.
c(consumption_energy = "mean_total_consumption", ...).
Integer index used for vector extraction (individual branch).
NULL for scalar extraction (population / TMB branches).