XDATA-VM SPECIFIC: Before we dive into the build, we need to set some other things up. If you are not using the XDATA-VM you can begin at "Forecast and Chron are Required."
$ sudo vi /etc/R/ldpaths
Replace the first line with ": ${JAVA_HOME=/usr/lib/jvm/java-7-oracle/jre}" without the quotes.
Next open up your bashrc.
$ vi ~/.bashrc
Add this line to the bottom of the bashrc: export LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/amd64:$JAVA_HOME/jre/lib/amd64/server
Now type the command below.
$ source ~/.bashrc
Forecast and Chron are Required.
$ sudo R
Check installed packages and make sure they are all >= 3.0.0.
> installed.packages()
If they are not all >= 3.0.0, then updated installed packages.
> update.packages(checkBuilt = F, ask = F)
If codetools does not update, then run the command below.
> update.packages(checkBuilt = T, ask = F)
Now install forecast and chron.
> install.packages(c("forecast", "chron"))
See: How To Deploy