Executes the steps to load an R package written in R Markdown format in one go:
Purl all relevant
Rmd/*.Rmdfiles toR/*.gen.Rfiles usingpurl_rmd().Loads the package using
devtools::load_all().
Usage
load_pkg(
path = ".",
add_copyright_notice = FALSE,
add_license_notice = FALSE,
gen_pkgdown_ref = FALSE,
reset = TRUE,
recompile = FALSE,
export_all = TRUE,
helpers = TRUE,
quiet = FALSE,
...
)Arguments
- path
Path to the root of the package directory.
- add_copyright_notice
Whether or not to add a copyright notice at the beginning of the generated
.Rfiles as recommended by e.g. the GNU licenses. The notice consists of the name and description of the program and the wordCopyright (C)followed by the release years and the name(s) of the copyright holder(s), or if not specified, the author(s). The year is always the current year. All the other information is extracted from the package'sDESCRIPTIONfile. A logical scalar. Only applies ifpathis actually an R package directory.- add_license_notice
Whether or not to add a license notice at the beginning of the generated
.Rfiles as recommended by e.g. the GNU licenses. The license is determined from the package'sDESCRIPTIONfile and currently only theAGPL-3.0-or-laterlicense is supported. A logical scalar. Only applies ifpathis actually an R package directory.- gen_pkgdown_ref
Whether or not to overwrite pkgdown's reference index in the configuration file
_pkgdown.ymlwith an auto-generated one based on the main input file as described ingen_pkgdown_ref(). A logical scalar. Only applies ifpathis actually an R package directory, pkgdown is set up and a main R Markdown file exists.- reset
This is no longer supported because preserving the namespace requires unlocking its environment, which is no longer possible in recent versions of R.
- recompile
DEPRECATED. force a recompile of DLL from source code, if present. This is equivalent to running
pkgbuild::clean_dll()beforeload_all()- export_all
If
TRUE(the default), export all objects. IfFALSE, export only the objects that are listed as exports in the NAMESPACE file.- helpers
if
TRUEloads testthat test helpers.- quiet
if
TRUEsuppresses output from this function.- ...
Additional arguments passed to
pkgload::load_all().
See also
Other high-level functions:
lint_rmd(),
process_pkg(),
purl_rmd(),
run_nopurl_rmd()