Creates metric-specific year labels without changing native Year, values, targets, samples, or dynamics. Column names alone never establish a custom metric's timing. No initial population or missing endpoint is invented.
Usage
mse_reporting_view(x, metrics, timing = NULL, windows = NULL,
window_axis = c("native", "reported"))Arguments
- x
Completed decamod_mse result, or a non-empty data frame with native Year.
- metrics
Non-empty vector of unique columns to view.
- timing
Named metric timings. Required for legacy or custom fields without saved declarations. The advice_year clock uses the saved advice_year column; target_timing uses each row's declared estimator timing and rejects unspecified targets. Known saved declarations cannot be silently overridden.
- windows
NULL for all actual rows, or a uniquely named list of years.
- window_axis
Explicit native or reported year axis; default native.
Value
A decamod_mse_reporting_view list with schema, native, data, timing, windows, window_axis, completion_scope, and initial_state_inferred. The original input is retained exactly as native. The long data view retains original row positions and keys, with list-valued cells preserving types and size vectors.
Details
Partial MSE objects fail. Completed objects with saved grid specifications must retain their full original grid. Data-frame completion is not asserted: only actual rows are used. Legacy objects without a saved grid are explicitly labelled completed_result_flag_only, not grid-verified. Requested window years must exist for every represented trajectory and metric, not merely somewhere in a pooled sample. Reported-year windows may select different native rows for population and interval metrics. Static references cannot use reported-year windows.
Existing numerical summaries retain native-year grouping and window semantics, including original predecessor TACCs outside a selected window. This view does not recalculate indicators, targets, or denominators. Adding package functions changes future code fingerprints. Old results can be read without rewriting them, but old checkpoint signatures are not relaxed or re-signed and frozen runs are not authorised to resume under changed code.
