Description Usage Arguments Value Examples
Loads and attaches add-on packages. If the package is not present locally the package is installed from the CRAN repo. This is useful in making code run after new R installation or upon transfer to other machines.
1 | ensure.libraries(packages.to.install = "tidyverse", verbose = FALSE)
|
packages.to.install |
- a vector containing names of packages to install |
verbose |
- a TRUE/FALSE value for verbose operation |
messages from library installs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## simple installation of add-on packages
##
## require devtools to install package.
library(devtools)
install_github("ww44ss/ensure.libraries")
library(ensure.libraries)
packages <- c("tidyverse",
"ggplot2",
"stringr",
"ww44ss/yo"
)
ensure.libraries(packages)
## can also use shorter form
ensure(packages)
## end (not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.