Directories for storing R-related user-specific data, configuration and cache files.
a character string giving the name of an R package
a character string indicating the kind of file(s) of interest. Can be abbreviated.
For desktop environments using X Windows, the freedesktop.org project (formerly X Desktop Group, XDG) developed the XDG Base Directory Specification (https://specifications.freedesktop.org/basedir-spec) for standardizing the location where certain files should be placed. CRAN package rappdirs provides these general locations with appropriate values for all platforms for which R is available.
R_user_dir specializes the general mechanism to R package
specific locations for user files, by providing package specific
subdirectories inside a ‘R’ subdirectory inside the “base”
directories appropriate for user-specific data, configuration and
cache files (see the examples), with the intent that packages will not
interfere if they work within their respective subdirectories.
The locations of these base directories can be customized via the specific environment variables R_USER_DATA_DIR, R_USER_CONFIG_DIR and R_USER_CACHE_DIR. If these are not set, the general XDG-style environment variables XDG_DATA_HOME, XDG_CONFIG_HOME and XDG_CACHE_HOME are used if set, and otherwise, defaults appropriate for the R platform in use are employed.
1 2 3
## IGNORE_RDIFF_BEGIN R_user_dir("FOO", "cache") ## IGNORE_RDIFF_END
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.