make_path | R Documentation |
This function creates directories recursively (as necessary) to the specified file.
make_path(x, ...)
## S3 method for class 'filename'
make_path(x, showWarnings = FALSE, recursive = TRUE, ...)
## S3 method for class 'character'
make_path(x, ...)
x |
file name ( |
... |
other arguments passed to |
showWarnings |
whether to show warnings |
recursive |
whether to recursively create all parent directories |
## Not run:
# CRAN policy forbids package example to write to current directory,
# even inside \dontrun because the user may copy-and-paste and
# polute his/her current directory;
# in real-world setting, the `tempdir` path prefix is unnecessary
x <- file.path(tempdir(), "path/to/file.txt")
fn <- as.filename(x)
make_path(fn)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.