Skip to contents

Applies targeted patches to the editable params <- list(...) block of an exported RAP file without re-exporting from scratch. A .bak backup is created before any modification.

Usage

sus_rap_update(rap, ..., backup = TRUE, lang = "pt")

Arguments

rap

A rap_object returned by sus_rap_read().

...

Named parameters to update (e.g. uf = "\"RJ\"", years = "2021:2024"). Values are treated as raw R code strings.

backup

logical(1) - Create a .bak backup before writing. Default TRUE.

lang

character(1) - Language for messages.

Value

Invisibly, the updated rap_object (re-read from the patched file).

Examples

if (FALSE) { # \dontrun{
rap    <- sus_rap_read("pipeline_sp.R")
rap_rj <- sus_rap_update(rap, uf = '"RJ"', years = "2021:2024")
} # }