retrieve: Retrieve files from the local cache

Description Usage Arguments Value See Also Examples

View source: R/retrieve.R

Description

Retrieve files from the local cache

Usage

1

Arguments

id

a content_id

dir

the path we should use for permanent / on-disk storage of the registry. An appropriate default will be selected (also configurable using the environmental variable CONTENTID_HOME), if not specified.

Value

path to a local copy of the file.

See Also

store

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Store & retrieve local file
vostok_co2 <- system.file("extdata", "vostok.icecore.co2",
                          package = "contentid")
 id <- store(vostok_co2)
 retrieve(id)
 

 # Store and retrieve content from a URL 
id <- store(paste0("https://knb.ecoinformatics.org/knb/d1/mn/v2/object/",
"ess-dive-457358fdc81d3a5-20180726T203952542"))
retrieve(id)

cboettig/contentid documentation built on April 1, 2021, 11:25 p.m.