usepkg | R Documentation |
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 = "http://cran.us.r-project.org")
packages |
Character or character vector with names of the packages you want to use. |
noCache |
When checking packages, you can choose to ignore the cached list, which will increase accuracy but decrease speed. |
repos |
choose the URL to install from. |
# packages shouldn't be installed during tests or examples according to CRAN.
# therefore, examples cannot be provided because CRAN now runs donttest examples.
usepkg('geodist', FALSE, 'http://cran.us.r-project.org')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.