loadDepends {reposTools} | R Documentation |
Given a package or a vignette, will determine any dependencies and load the required packages - as well as alerting the user to any unresolved dependencies.
loadDepends(x, force = FALSE, recursive = TRUE, local = TRUE)
x |
The object to check |
force |
If TRUE, will continue even if not all dependencies are installed |
recursive |
Whether or not to look at indirect dependencies |
local |
Whether or not to only search locally or to use the internet to find unresolved dependencies |
This function will first determine if the object is an installed
package or a vignette. In either case, it will extract a listing of
all dependencies (both the names and any versioning requirements).
If not all of the dependencies are met, the function will halt with
an error and report which packages were not met - unless the
force
option is set to TRUE
. Otherwise, all of the
installed dependencies will be loaded.
A character vector listing the loaded packages. If there were no installed dependencies to load, an empty vector is returned.
Jeff Gentry
## Using 'local==TRUE' in case the user doesn't have an internet ## connection available. loadDepends("reposTools", local=TRUE)