This function will store your cache_dir path on your local machine
and would load it for future sessions. Type
Sys.getenv("EUROSTAT_CACHE_DIR") to
find your cached path.
Alternatively, you can store the cache_dir manually with the following
options:
Run
Sys.setenv(EUROSTAT_CACHE_DIR = "cache_dir"). You would need to run this command on each session (Similar toinstall = FALSE).Set
options(eurostat_cache_dir = "cache_dir"). Similar to the previous option. This is provided for backwards compatibility purposes.Write this line on your .Renviron file:
EUROSTAT_CACHE_DIR = "value_for_cache_dir"(same behavior thaninstall = TRUE). This would store yourcache_dirpermanently.
Arguments
- cache_dir
A path to a cache directory. On missing value the function would store the cached files on a temporary dir (See
base::tempdir()).- overwrite
If this is set to
TRUE, it will overwrite an existingEUROSTAT_CACHE_DIRthat you already have in local machine.- install
if
TRUE, will install the key in your local machine for use in future sessions. Defaults toFALSE. Ifcache_dirisFALSEthis parameter is set toFALSEautomatically.- verbose
Logical, displays information. Useful for debugging, default is
FALSE.
See also
Other cache utilities:
clean_eurostat_cache()
Examples
# Don't run this! It would modify your current state
if (FALSE) { # \dontrun{
set_eurostat_cache_dir(verbose = TRUE)
} # }
Sys.getenv("EUROSTAT_CACHE_DIR")
#> [1] "/tmp/RtmpfcC3Cx/eurostat"
