Return path
projr_path_get.Rd
Returns path to projr
profile-specific directory.
Differs from projr_dir_get
in that it does not assume
that the path is to a directory.
Will create the parent directory of the specified
path if it does not exist, and ignore it
if requested by _projr.yml
.
Arguments
- label
character. One of
"data_raw"
,"cache"
,"output"
,"archive"
and"docs"
. Class of directory to return. The"docs"
option returns the path to the output directory frombookdown::render_book
(as specified in"_bookdown.yml"
), whereas the others returns paths as specified in"_projr.yml"
.- ...
Specifies sub-path of directory returned.
- create
logical. If
TRUE
, then the parent directory is created if it does not exist and it is ignored (or not) from.gitignore
and.Rbuildignore
as specified in_projr.yml
. Default isTRUE
.- relative
logical. If
TRUE
, then forces that the returned path is relative to the project root. Default isFALSE
.- absolute
logical. If
TRUE
, then forces the returned path to be absolute. Default isFALSE
.- safe
logical. If
TRUE
, then the output directory is set to be"<path_to_cache>/projr_output"
instead of<path_to_output>
(as specified in_projr.yml
). The only time that this should be set toTRUE
should be whenprojr_build_output
is being run, as otherwise "development" or test runs will add to, delete or overwrite fabciles from the previous run ofprojr_build_output
. Default isTRUE
. Do not change this unless you know what you are doing.
Examples
if (FALSE) { # \dontrun{
if (interactive()) {
# EXAMPLE1
}
} # }