← Back to all sparks
A

ageproR

ANALYTICS
Velocity0.0

R package interface for AGEPRO (Age Structured Projection Model) data

ageproR spent two years chasing a moving file format, then added the recruitment models that justify the effort.

fisheries-sciencestock-assessmentr-packagefile-format-validationrecruitment-models
Current state
An R interface for building and validating AGEPRO input files — the configuration format for a fisheries stock projection program used in stock assessments. Releases come every few months and are dominated by one recurring problem: keeping up with the AGEPRO input file format, which has moved between VERSION 4.0 and VERSION 4.25 in both directions across this window. The package spends considerable effort on validation, version detection, and clear error messages when a file does not match.
Where it's heading
The version-format churn is settling. Release 0.7.1 reverted the default back to VERSION 4.0 as a bugfix, and 0.9.0 finally set 4.25 as current while retaining a 4.0 compatibility string and improving the detection messages — a resolution rather than another reversal. With that stabilising, the substantive work has been the recruitment model coverage added in 0.8.0, which brought autocorrelated lognormal error structures into the package for the first time. Naming has been converging too, with output_stock_summary and summary_output_flag renamed to auxiliary variants to match the AGEPRO-GUI specification.
Prediction
Expect the remaining recruitment models to be filled in against the AGEPRO specification, and the version handling to stay on 4.25 now that both formats are supported and validated rather than swapped.

Recent moves

  1. 2mo ago

    write_inp option flag detection fixed after 0.8.0 dependency changes

    Fixes a write_inp error detecting options_flags and removes references left over from undocumented agepro_flag dependency changes in 0.8.0, plus formatting and a CITATION entry. Cleanup of loose ends from the larger recruitment release.

    View source ↗
  2. 6mo ago

    AGEPRO VERSION 4.25 becomes the default format, with 4.0 kept compatible

    Sets 4.25 as the current input file format while adding an explicit 4.0 compatibility string and clearer validation messages when an older format is detected — resolving the version oscillation that 0.7.1 had reverted. The auxiliary output flag renames align the package's field names with the AGEPRO-GUI 4.3.6 specification.

    View source ↗
  3. 1y ago

    Four recruitment models added, including autocorrelated lognormal error

    ⚡ SPARK

    The largest capability release in the window, and the one the surrounding version-format work exists to serve. It moves the package from configuring a subset of AGEPRO's recruitment options to covering the autocorrelated-error family, and the shared base class it introduces is what makes further models cheap to add.

    View source ↗
  4. 1y ago

    agepro_inp_model initialisation aligned with the other model classes

    Lets agepro_inp_model be initialised with general model parameters, matching agepro_model and agepro_json_model, and adds a model_name parameter defaulting to an unnamed placeholder. Basic testthat coverage arrives here too — the first unit tests in a package whose main job is validation.

    View source ↗
  5. 1y ago

    Version string read from line 1; invalid recruitment data blocks export

    Reads the version string from the input file's first line to check format properly, and adds validation that interrupts export when recruitment data is null or comes from the deprecated model 9, nullifying recruitData in JSON output rather than writing something invalid. Failing at write time rather than producing a file the projection program will reject.

    View source ↗
  6. 1y ago

    Input file format reverted to VERSION 4.0 as a bugfix

    Reverts the current input file version to 4.0 while keeping 4.25 among the supported formats, with an overwrite_as_currentver flag to preserve a file's existing version on write. The clearest illustration of the format instability this package was absorbing before 0.9.0 settled on 4.25.

    View source ↗