Here is what happens if we comment out the proxy setting (line 3 above) and rerun the script; the first 5 packages are successfully installed, but when we reach doParallel (line 16), we get an error for missing dependencies:

Why the missing dependencies? Well, as we have stressed (apparently not strongly enough) in the recent past, the combination of repos=NULL,dependencies=TRUE arguments, as it happens here, is invalid, as clearly indicated in the documentation:

dependencies logical indicating whether to also install uninstalled packages which
these packages depend on/link to/import/suggest (and so on recursively).
Not used if repos = NULL.

And of course, the fact that both dependencies of doParallel are indeed queued for installation further down (lines 17 & 19) does not change the issue that doParallel will not be installed.

Out of the 50 requested additional packages, 17 cannot be installed; most of them fail due to missing dependencies, as above, but arulesViz fails because there is a typo in the file name. At the end of the day, out of the 3 “main” packages (as mentioned in the comments of the installation script) arules, arulesViz, and forecast, only arules will be available (which comes preinstalled, albeit in an old version).

We have argued in the past why installing R packages in such a way makes little sense; we will not repeat the arguments here. So, if one wants the additional packages installed, here is a simple R script to do so:

where we have left some packages to be installed as dependencies, and we install again arules in its latest version (needed for arulesViz).

Run the script from your home folder, with

Rscript --verbose 'scripts/additional_packages.R'

See the last part of this post for explanation of the (minor) warnings.

A quick inspection shows that almost all of the packages in our list have been successfully installed, with two exceptions: RcppArmadillo, due to incompatibility with the existing g++ compiler, and forecast, which depends on RcppArmadillo. We can easily amend this by downloading a previous version of the former – just append the following lines in the above R script:

Christos - Iraklis is one of our resident Data Scientists. He holds advanced graduate degrees in applied mathematics, engineering, and computing. He has been awarded both Chartered Engineer and Chartered Manager status in the UK, as well as Master status in Kaggle.com due to "consistent and stellar results" in predictive analytics contests.