get_resource(dataPkg, resource, cache = TRUE, ...)
read_data_package
) to use.resources
hash - If the resources
value was provided as a
JSON hash instead of an array, the required name
prefacing each resource will be used as that resource's
canonical name. id
field within each
resource will be checked for any exact matches. name
field within each resource will be checked
for any exact matches. url
and
path
fields within each resource will be checked
for any exact matches. url
and
path
fields within each resource will be checked
for partial matches on the extracted
portion of a / /
reference. The
path is extracted using dirname
and ignored
to see if the remainder of the string matches (with the
possible exclusion of a prefacing slash). TRUE
, (default) the function will
check this Data Package to see if the resource has
already been cached. If it has, it will simply return the
resource from the cache. If it has not, the function will
retrieve the remote resource then save a copy in this
package's cache. Note that this will involve storing an
extra copy of the data, doubling memory usage. If
FALSE
, the function will retrieve the resource
remotely, but not store the result in the cache when
returning. The third option is to set cache to
"flush"
. When this occurs, the function will
retrieve the resource remotely, ignoring any pre-existing
local copy, and store the result in the cache for future
use.