Use this function with caution. This function would clear your cached data and configuration, specifically:
Deletes the giscoR config directory (
rappdirs::user_config_dir("giscoR", "R")).Deletes the
cache_dirdirectory.Deletes the values on stored on
Sys.getenv("GISCO_CACHE_DIR").
Arguments
- config
if
TRUE, will delete the configuration folder of giscoR.- cached_data
If this is set to
TRUE, it will delete yourcache_dirand all its content.- verbose
logical. If
TRUEdisplays informational messages.
Details
This is an overkill function that is intended to reset your status as it you would never have installed and/or used giscoR.
See also
Other cache utilities:
gisco_set_cache_dir()
Examples
# Don't run this! It would modify your current state
# \dontrun{
my_cache <- gisco_detect_cache_dir()
#> ℹ C:\Users\RUNNER~1\AppData\Local\Temp\RtmpGEWXl5/giscoR
# Set an example cache
ex <- file.path(tempdir(), "example", "cache")
gisco_set_cache_dir(ex, verbose = FALSE)
# Restore initial cache
gisco_clear_cache(verbose = TRUE)
#> ! giscoR data deleted: C:\Users\RUNNER~1\AppData\Local\Temp\RtmpGEWXl5/example/cache
gisco_set_cache_dir(my_cache)
#> ℹ giscoR cache dir is C:\Users\RUNNER~1\AppData\Local\Temp\RtmpGEWXl5/giscoR.
#> ℹ To install your `cache_dir` path for use in future sessions run this function with `install = TRUE`.
identical(my_cache, gisco_detect_cache_dir())
#> ℹ C:\Users\RUNNER~1\AppData\Local\Temp\RtmpGEWXl5/giscoR
#> [1] TRUE
# }
