Skip to contents

Clone and/or pull repositories that are part of a data commons project.

Usage

datacommons_refresh(dir, clone_method = "http",
  include_distributions = FALSE, refresh_distributions = FALSE,
  only_new = FALSE, reset_repos = FALSE, reset_on_fail = FALSE,
  rescan_only = FALSE, run_checks = TRUE, dataset_map = "region_type",
  force_value_check = FALSE, verbose = TRUE)

Arguments

dir

Directory of the data commons projects, as created by init_datacommons.

clone_method

Means of cloning new repositories; either "http" (default) or "ssh".

include_distributions

Logical; if TRUE, will attempt to locate and cache copies of datasets pointed to from the data repositories (so far just from Dataverse, implicitly from DOI files).

refresh_distributions

Logical; if TRUE, will download fresh copies of the distribution metadata.

only_new

Logical; if TRUE, only repositories that do not yet exist will be processed.

reset_repos

Logical; if TRUE, will fetch and hard reset the repositories to remove any local changes.

reset_on_fail

Logical; if TRUE, will reset only if a regular pull fails.

rescan_only

Logical; if TRUE, will only read the files that are already in place, without checking for updates from the remote repository.

run_checks

Logical; if FALSE, will not run check_repository on each repository.

dataset_map

A named vector of ID to dataset mappings to pass to check_repository if run_checks is TRUE.

force_value_check

Logical; if TRUE, will always intensively check values, even on large files.

verbose

Logical; if FALSE, will not show updated repositories.

Value

An invisible character vector of updated repositories.

Examples

if (FALSE) {
# refresh from a data commons working directory
datacommons_refresh(".")
}