Checks the local R library(ies) to see if the required package(s) is/are installed or not. If the package(s) is/are not installed, then the package(s) will be installed along with the required dependency(ies). This function pulls source or binary packages from the Revolution Analytics CRAN mirror and/or the USGS GRAN Repository. Lastly, the chosen package(s) is/are loaded.
Any additional R packages.
Install and load
package1 and other packages listed
in the arguments
... and all of the dependencies.
maloneypatr, Irucka Embry
Check if R package is installed then load library answered by maloneypatr is the source for the original function. See https://stackoverflow.com/questions/15155814/check-if-r-package-is-installed-then-load-library.
Error Handling in R By Nina Zumel, October 9, 2012, R-Bloggers. See http://www.r-bloggers.com/error-handling-in-r/.
1 2 3 4 5 6 7
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.