Learn R Programming

safedata (version 1.1.3)

fetch_record_metadata: Get and load SAFE dataset metadata

Description

Internal handlers to i) ensure there are local copies of record metadata, fetching it from the SAFE project website if needed and ii) load that data from file.

Usage

fetch_record_metadata(record_set)

load_record_metadata(record_set)

Value

The fetch_record_metadata function invisibly returns a logical value indicating if all records were fetched successfully and

load_record_metadata returns a list object containing record metadata

Arguments

record_set

An object of class safe_record_set.

Functions

  • fetch_record_metadata: Download and store JSON metadata for a record

  • load_record_metadata: Load JSON metadata for a record

Details

This is the same metadata used to populate the Zenodo description but is downloaded as JSON format and stored within the record directory in the SAFE data directory for reuse.

Examples

Run this code
   # \donttest{
   set_example_safe_dir()
   rec <- validate_record_ids(1400562)
   safedata:::fetch_record_metadata(rec)
   metadata <- safedata:::load_record_metadata(rec)
   unset_example_safe_dir()
   # }

Run the code above in your browser using DataLab