loadCaches: Loads pre-made caches

Description Usage Arguments Examples

View source: R/loadCaches.R

Description

This function just takes a list of caches, and loads them. It's designed for stuff you already cached previously, so it won't build any caches.

Usage

1
loadCaches(cacheNames, loadEnvir = NULL, ...)

Arguments

cacheNames

Vector of caches to load.

loadEnvir

Environment into which to load each cache.

...

Additional parameters passed to simpleCache.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# choose location to store caches
cacheDir = tempdir()
cacheDir
setCacheDir(cacheDir)

# build some caches
simpleCache("normSample", { rnorm(5e3, 0,1) }, recreate=TRUE, timer=TRUE)
simpleCache("normSample", { rnorm(5e3, 0,1) })
simpleCache("normSample", { rnorm(5e3, 0,1) }, reload=TRUE)

# storing a cache after-the-fact
normSample2 = rnorm(10, 0, 1)
storeCache("normSample2")

# what's available?
listCaches()

# load a cache
simpleCache("normSample")

# load multiples caches
loadCaches(c("normSample", "normSample2"), reload=TRUE)

databio/simpleCache documentation built on April 24, 2021, 12:30 a.m.