| user_dir | R Documentation |
get the user dir to save app caches, logs and data (a wrapper function of tools::R_user_dir())
user_dir(
appname = NULL,
which = c("data", "config", "cache"),
appauthor = NULL,
...
)
appname |
App name (a single directory name) |
which |
one of "data", "config" or "cache", see |
appauthor |
ignored, kept for backward compatibility |
... |
passed on to |
tools::R_user_dir() is used instead of rappdirs::user_data_dir()
because it honors the R_USER_<which>_DIR environment variables, with
which R CMD check (and CRAN) redirects all user-level directories to a
temporary location. A directory written outside of tempdir() during
checks violates the CRAN policy.
a directory (created if not exists)
Guangchuang Yu
Other os-utils:
exec(),
has_internet()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.