Skip to contents

Update any auxiliary data

Usage

aux_fun(
  measure,
  repo = paste0("aux_", measure),
  owner = getOption("pipfun.ghowner"),
  maindir = getOption("pipaux.working_dir"),
  processed = new.env(parent = emptyenv()),
  force = FALSE,
  tag = NULL,
  log = TRUE,
  log_overwrite = FALSE,
  verbose = FALSE,
  ...
)

Arguments

measure

character: Name of the measure to process

repo

character: Name of the GitHub repository containing the auxiliary data Defaults to "aux_<measure>" unless measure is "income_groups" or "country_list", in which case it defaults to "Class".

owner

character: GitHub repository owner. Default is getOption("pipfun.ghowner")

maindir

character: Main directory of the project. Default is getOption("pipaux.working_dir")

processed

environment: Environment that keeps track of already processed measures to avoid redundant processing. Default is a new empty environment

force

logical: If TRUE, forces an update even if the data appears up to date. Default is FALSE

tag

character: Specifies the GitHub branch tag for versioning. Defaults to release_branch, which is determined from the working release

log

logical, defaults to TRUE. Enables or disables logging in "pipaux_log"

...

Additional arguments passed to the auxiliary function handling the measure

Value

This function does not return a value but performs the requested action (load/update).

Details

This function updates any auxiliary data. It ensures that dependencies are processed before handling the specified measure and checks whether updates are needed for GitHub or the Y drive.

Examples

if (FALSE) { # \dontrun{
  # Update a specific measure (e.g., gdp data)
  aux_fun(measure = "gdp", action = "update")


} # }