Learn R Programming

Require (version 0.3.1)

RequireCacheDir: Path to (package) cache directory

Description

Sets (if create = TRUE) or gets the cache directory associated with the Require package.

Usage

RequireCacheDir(create)

RequirePkgCacheDir(create)

Value

If !is.null(getOptionRPackageCache()), i.e., a cache path exists, the cache directory will be created, with a README placed in the folder. Otherwise, this function will just return the path of what the cache directory would be.

Arguments

create

A logical indicating whether the path should be created if it does not exist. Default is FALSE.

Details

To set a different directory than the default, set the system variable: R_USER_CACHE_DIR = "somePath" and/or R_REQUIRE_PKG_CACHE = "somePath" e.g., in .Renviron file or Sys.setenv(). See Note below.