pd_cache: Caching POPDATA downloaded files

pd_cacheR Documentation

Caching POPDATA downloaded files

Description

Manage cached POPDATA downloaded files

Usage

pd_cache_set_dir(path)

pd_cache_get_dir()

pd_cache_list()

pd_cache_delete(file)

pd_cache_clear()

Arguments

path

character, directory to set

file

Character, the file to delete

Details

The default cache directory is ⁠~/.cache/R/popdata⁠, but you can set your own path using pd_cache_set_dir()

Value

the cache directory

the cache directory

list of files in the cache

Examples

## Not run: 
pd_cache
## change the default cache directory
tmp <- tempdir()
pd_cache_set_dir(tmp)

## print current cache directory
pd_cache_get_dir()

## List available files in the current cache directory
pd_cache_list()

l <- pd_cache_list()[1] ## get the first file
pd_cache_delete(l) ## delete it

pd_cache_clear() ## delete all cached files

## End(Not run)

PopulationStatistics/popdata documentation built on Sept. 29, 2023, 2:33 a.m.