Skip to contents

Reads a YAML recipe exported by sus_rap_recipe() and reconstructs a rap_object. Parameter overrides can be supplied at import time. Passing execute = TRUE immediately re-runs the pipeline using sus_rap_run().

Usage

sus_rap_from_recipe(
  recipe_path,
  override_params = list(),
  execute = FALSE,
  lang = "pt",
  ...
)

Arguments

recipe_path

character(1) - Path to the .yaml recipe file.

override_params

Named list of parameters to override from the recipe (e.g. list(uf = "RJ", years = 2022:2024)).

execute

logical(1) - Run the pipeline immediately after loading. Default FALSE.

lang

character(1) - Language for messages.

...

Additional arguments forwarded to sus_rap_run() when execute = TRUE.

Value

A rap_object (or the pipeline result when execute = TRUE).

Examples

if (FALSE) { # \dontrun{
rap <- sus_rap_from_recipe("pipeline_sp.yaml")
print(rap)

# Import with parameter overrides
rap_rj <- sus_rap_from_recipe("pipeline_sp.yaml",
                              override_params = list(uf = "RJ"))
} # }