insert_dataset: Inserts local copies of files from a dataset into a SAFE data...

View source: R/load_safe.R

insert_datasetR Documentation

Inserts local copies of files from a dataset into a SAFE data directory

Description

If files are embargoed or restricted, then users may request the datafiles from the authors. This function allows provided files to be incorporated into a SAFE data directory, so that they will then work seamlessly alongside openly available data.

Usage

insert_dataset(record_id, files)

Arguments

record_id

A SAFE dataset record id

files

A vector of files to insert into the data directory

Examples

   set_example_safedata_dir()
   files <- system.file("api_data", "template_ClareWfunctiondata.xlsx",
                        package = "safedata")
   insert_dataset(1237719, files)
   dat <- load_safe_data(1237719, "Data")
   str(dat)
   set_example_safedata_dir(on=FALSE)

ImperialCollegeLondon/safe_data documentation built on Jan. 27, 2024, 9:51 a.m.