knitr::opts_chunk$set(echo = TRUE, warning=FALSE)
lwPackageHelpR
is a light weight R package install and update manager.
There are two key functions:
install_new(pkg, repo = "http://cran.revolutionanalytics.com/", libPath = .libPaths()[1]))
install_new_github(pkg, repo, libPath)
This function checks to see if the package is installed. If not, it will install the package. Use it like this:
if( Sys.info()['sysname'] == "Windows"){ Sys.setenv(JAVA_HOME="") print("unset JAVA_HOME for Windows") } library(lwPackageHelperR) install_new('devtools', .libPaths()[1])
Here we install the development version of Yihui Xie's
xaringan
package from github.
``````r if( Sys.info()['sysname'] == "Windows"){
Sys.setenv(JAVA_HOME="") print("unset JAVA_HOME for Windows")
}
install_new_github('xaringan','yihui',.libPaths()[1])
```
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.