pkgload2 | R Documentation |
pkgload::load_all
with cachingpkgload::load_all
does not automatically deal with dependency chains: the
user must manually load the dependency chain in order with separate calls to
pkgload::load_all
. Also, it does not use caching. This function allows
nested caching for a sequence of packages that depend on one another. For
example, if a user has 3 packages that have dependency chain:
A is a dependency of B which is a dependency of C.
If a change happens in C, then pkgload::load_all will only be called on C.
If a change happens in A, then pkgload::load_all will be called on A, then B, then C.
pkgload2(
depsPaths = file.path("~/GitHub", c("reproducible", "SpaDES.core", "LandR")),
envir = parent.frame()
)
depsPaths |
A character vector of paths to packages that need loading, or list of these. Each vector should be the load order sequence, based on the package dependencies, i.e., the first element in the vector should be a dependency of the second element in the vector etc. For packages that do not depend on each other, use separate list elements. |
envir |
An environment where an object called .prevDigs that will be placed and used as a cache comparison. |
This is called for its side effects, which are 2: pkgload::load_all on the
packages that need it, and an object, .prevDigs
that is assigned to envir
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.