Learn R Programming

mapmisc (version 1.7.0)

persistentCache: Set a persistent cache

Description

Sets a cache folder in temporary space

Usage

persistentCache(verbose=TRUE)

Arguments

verbose

print location of the cache folder

Details

The default cache for map images is tempdir()/mapmiscCache, which will be deleted when an R session ends. Running this function sets a cache in /tmp/mapmiscCache_[username], which will re-use cached data across R sessions.

Examples

Run this code
# NOT RUN {
# current cache
getOption("mapmiscCachePath")

# set a new cache
myCache = file.path(tempdir(), 'myCache')
dir.create(myCache)
options(mapmiscCachePath = myCache)
getOption("mapmiscCachePath")

# create a persistent cache
# }
# NOT RUN {
persistentCache(verbose=TRUE)
# }
# NOT RUN {
getOption("mapmiscCachePath")
# }

Run the code above in your browser using DataLab