The fourth-down conversion and win-probability models are downloaded the
first time they are needed and cached under
tools::R_user_dir("cfb4th", "cache"), in a folder named after the package
version; caches left by other versions are removed when a model is cached.
Clear the cache to force a fresh download, for example after a model update.
Usage
cfb4th_clear_cache(type = c("all", "fd_model", "wp_model"))Examples
# point the cache at a temporary folder, so the example leaves your cached
# model files alone (it still drops this session's in-memory copies)
old <- Sys.getenv("R_USER_CACHE_DIR", unset = NA)
Sys.setenv(R_USER_CACHE_DIR = tempfile())
cfb4th_clear_cache()
if (is.na(old)) Sys.unsetenv("R_USER_CACHE_DIR") else Sys.setenv(R_USER_CACHE_DIR = old)