View source: R/soilDB_user_dir.R
soilDB_user_dir | R Documentation |
Wrapper around tools::R_user_dir()
for soilDB-specific file
storage in a platform-specific, user-level directory. Requires R >= 4.0.
These directories can be used for storing assets used as input to other soilDB functions, or for caching results to allow for offline use or fewer repeated requests to remote sources.
Use argument remove=TRUE
to delete files stored in the specified
directories.
soilDB_user_dir(
which = c("data", "config", "cache"),
...,
create = TRUE,
remove = FALSE,
fsep = .Platform$file.sep,
mustWork = NA
)
which |
character. One of: |
... |
character. Sub-directories. Additional arguments are passed to
|
create |
logical. When |
remove |
logical. When |
fsep |
character. File path separator. Passed to |
mustWork |
logical. Throw error if path cannot be normalized; passed
to |
If the directory path does not exist it is created (recursively)
when create=TRUE
. Output paths are normalized using
normalizePath()
and the specified path separator (fsep
).
character. File paths within specified soilDB user directory. When
remove=TRUE
result is NULL
.
Andrew Gene Brown
soilDB_user_dir("data", c("dataset1", "dataset2"), "source", create = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.