Pass a function (or, for withFieldLabel, a character vector) to register it; pass NULL explicitly to clear that slot; omit the argument to leave it untouched. Call with no arguments to inspect.

register_scenario_format(build, parse, withFieldLabel)

Arguments

build

Function (custom path builder), or NULL to clear.

parse

Function (custom path parser), or NULL to clear.

withFieldLabel

Either:

  • a character vector of field names (e.g. c(".rep", ".SSP")) – those fields' path segments get prefixed with the field name itself (.rep5, .SSP370); or

  • a named character vector mapping field name to display label (e.g. c(.rep = "rep", .SSP = "_ssp")) – those fields' path segments get prefixed with the mapped label (rep5, _ssp370). Pass character(0) or NULL to clear.

Value

Invisibly, the current (build, parse, withFieldLabel) triple.

Details

Lookup precedence (highest first): registered slot -> pathBuild/pathParse defined in the global environment -> the package defaults.

Override signature contract: build(..., pre = "outputs") — receives the scenario as named ... args (one per field) plus pre; returns a path string. parse(path, pre = "outputs") — returns a named list of fields.