cacheR-package: cacheR: Save Data in Git-friendly Format

Description Author(s) See Also Examples

Description

Read and write any R object to disk using plaintext as much as possible.

Author(s)

Maintainer: Antoine Sachet antoine.sac@gmail.com

See Also

write_cache read_cache

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
library("cacheR")
path <- tempdir()

my_data <-
  list(data = mtcars,
       model = lm(mpg ~ gear, data = mtcars),
       details = list(date = "2030-01-01",
                      version = "1.2"))

write_cache(my_data, path)

cache <- read_cache("my_data", path)

all.equal(my_data, cache)
# TRUE, of course!

unlink(path)

antoine-sachet/cacheR documentation built on Oct. 17, 2020, 10:11 a.m.