Description Usage Arguments Details Value Author(s) See Also
View source: R/loadOrInstall.R
This functino loads packages if they are installed already. If failed, it tries to install the package automatically and re-load the package after installation.
1 | loadOrInstall(package, dependencies="Depends",...)
|
package |
A character vector of the names of packages to be loaded. |
dependencies |
The same as in |
... |
Additional arguments passed to |
The function calls require
to see if the package can be loaded. If not, it calls install.packages
.
Then require
is called again for the installed package.
A logical scalar. TRUE
if all packages are loaded sucessfully. If FALSE
, its "failed"
attribute contains a vector of package names that failed to be loaded.
Long Qu
library
, require
, install.packages
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.