cache_data: Cache data obtained from the API.

Description Usage Arguments Value

Description

Convenience function to minimize redundant API calls and generally be a polite Internet citizen.

Usage

1
2
cache_data(x, dataset_id, type = c("metadata", "dataset"),
  cache_dir = "~/salinasr-cache", ...)

Arguments

x

Either a metadata object or a tibble::tibble.

dataset_id

character, ID used to identify dataset.

type

character, "metadata" or "dataset".

cache_dir

character, path to read/write data.

...

Additional arguments passed on to readr::write_rds().

Value

readr::write_rds returns x invisibly.


brendan-g-knapp/salinasr documentation built on May 22, 2019, 3:39 p.m.