Create a directory with an error message if it does not succeed.
dir.create2(path, recursive = TRUE, ...)
Further arguments to pass to
This is primarily necessary to avoid incomprehensible errors when
a directory cannot be created, usually due to insufficient permissions.
recursive=TRUE by default for convenience.
Note that the presence of an existing directory at
will cause this function to fail.
This is usually desirable in the context of basilisk.utils
as stale directories should be
path is created or an error is raised.
NULL is invisibly returned.
unlink2, for a similarly safe deletion function.
out <- tempfile() dir.create2(out)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.