User Data Directory

Description

userData returns the path to a local directory where package-related user data can be stored. Note that a directory is always created if necessary (see details).

Usage

userData(..., create = TRUE, package = "base")

Arguments

...
path parts passed to file.path to be appended to the main path.
create
logical that indicates if the directory should be created if it does not exists.
package
name of the package associated with the user data path. It is used to prefix the path, within the user R data directory.

Details

If in interactive mode, the user is asked if the directory can be created in his home directory, otherwise, or if the user does not allow the creation in his home, the directory is created in the current R session's temporary directory.

See also

tempdir