powered by
Installs a package if it needs to be installed, and calls require to load the package. Author: Scott Sobel. Tech Review: Bryce Chamberlain.
usepkg(packages, noCache = FALSE, repos = utils::getCRANmirrors()$URL[1])
Character or character vector with names of the packages you want to use.
When checking packages, you can choose to ignore the cached list, which will increase accuracy but decrease speed.
URL to use if a package needs to be downloaded.
# NOT RUN { usepkg(c('dplyr','lubridate')) usepkg('lubridate') # }
Run the code above in your browser using DataLab