fetch_record_metadata: Get and load SAFE dataset metadata

Description Usage Arguments Details Value Functions Examples

View source: R/metadata.R

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

1
2
3

Arguments

record_set

An object of class safe_record_set.

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.

Value

The fetch_record_metadata function returns NULL and load_record_metadata returns a list object containing record metadata

Functions

Examples

1
2
3
4
5
6
7
8
   ## Not run: 
   safedir <- system.file('example_data_dir', package='safedata')
   set_safe_dir(safedir, update=FALSE, validate=FALSE)
   rec <- validate_record_ids(1400562)
   safedata:::fetch_record_metadata(rec)
   metadata <- safedata:::load_record_metadata(rec)
   
## End(Not run)

ImperialCollegeLondon/safe_data documentation built on Jan. 29, 2020, 10:19 p.m.