Description Usage Arguments Value Author(s) Examples
Install packages that are missing from the local package library, but are described in the sessionInfo object. Future releases of this package will potentially allow the caller to specify package version options such as "latest", "referenced" for each package so that the each packge can be either upgraded to the latest version (if installed), or moved to the version referenced in the sessionInfo object, or left unchanged.
Currently, this function will only install a package if it is not already installed, and will always install the latest version available from the repository. If a package is already installed the installed version will be left intact.
1 | restorePackages(sessionInfo, repos = getRepos(), warn = TRUE)
|
sessionInfo |
A sessionInfo object |
repos |
The repositories to search for packages |
warn |
Boolean indicating whether a warning be displayed if not all packages can be installed. |
This method is executed for it's side-effects, which is to install packages to the default library.
Matthew D. Furia matt.furia@sagebase.org
https://github.com/MattNapsAlot
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
## get the session description
info <- sessionSummary()
## save to a binary
save(info, file="sessionInfo.rbin")
## restore
load(file = "sessionInfo.rbin")
restorePackages(info)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.