cache_data: Cache data obtained from the API.

Description Usage Arguments Value

View source: R/utils.R

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.


knapply/salinasr documentation built on May 27, 2019, 2:09 p.m.