Skip to contents

Read the catalogue selected by a source

Usage

read_reference_catalogue(source, offline = FALSE)

Arguments

source

Source configuration.

offline

Use the verified cache only.

Value

Catalogue rows with publication metadata.

Details

Catalogue and CSV checksums are verified before cached files are replaced.

Examples

# Choose a temporary location for this example.
reference_cache_directory <- tempfile("references-")
# Configure the reference catalogue sources.
reference_source_configuration <- reference_source(
  system.file("examples", "survey", "catalogue", "code_lists", package = "form.model"),
  reference_cache_directory)
# Read the catalogue and display its table IDs and versions.
read_reference_catalogue(reference_source_configuration)[, c("id", "version")]
#>          id version
#> 1 _aliases_   1.0.0
#> 2 observers   1.1.0
#> 3  stations   1.1.0
# Remove the temporary files created by this example.
unlink(reference_cache_directory, recursive = TRUE)