Skip to contents

Reconstructs and executes the pipeline contained in a rap_object. Any parameters passed via ... override the originals before execution, making it easy to replay an analysis for a different state or year range.

Usage

sus_rap_run(rap, ..., envir = parent.frame(), dry_run = FALSE, lang = "pt")

Arguments

rap

A rap_object returned by sus_rap_read().

...

Name-value pairs overriding fields in rap$params (e.g. uf = "RJ", years = 2021:2023).

envir

environment - Execution environment. Default parent.frame().

dry_run

logical(1) - Print the reconstructed code without executing. Default FALSE.

lang

character(1) - Language for messages.

Value

Invisibly, the data.frame produced by the pipeline.

Examples

if (FALSE) { # \dontrun{
rap <- sus_rap_read("pipeline_sp.R")
df  <- sus_rap_run(rap, uf = "RJ", years = 2021:2023)
sus_rap_run(rap, dry_run = TRUE)
} # }