Staging is a preliminary step of bringing code from external to the project
into the project. The intent is it remains a snapshot of code as it was at
the time of import
ing. This aids in reproducibility because if that
external code is changed, the staged code will remain fixed.
In practice, this function will rarely need to be used directly. The easiest way to bring code is via the "code library" RStudio 'Addin' shiny app.
stage(
files,
root_dir,
overwrite = FALSE,
silent = FALSE,
find_replace_dir_names = TRUE
)
Character vector. path of files to stage.
Character path to root directory of files
. Staged files
relative to staging
directory will be same as files
to root_dir
. If
this is not specified, will guess based on presence of nm_default_dirs
Logical (default = FALSE).
Logical (default = FALSE).
Logical (default = TRUE). Will attempt to find
replace strings in scripts to reflect nm_default_dirs()
.
A tibble
with staged file information.
## requires NMproject directory structure
if (FALSE) {
ls_code_library("Models/ADVAN2.mod") %>%
stage()
}