Setting up R to talk to Clojure
Another major statistical processing environment is R. It's an open source programming language and environment designed for statistical analysis. It's widely used and has an active community as well as a huge and growing body of useful add-on packages.
While there's no Clojure-specific interoperability library, there is one for Java, and we can use that to pass calls to R and to get results back. In this recipe, we'll set this system up.
Getting ready
We'll need to have R installed. We can download it from http://www.r-project.org/ by following the link to CRAN, picking a mirror, and downloading the correct version of R for our platform.
You'll also need to have Maven (http://maven.apache.org/) installed in order to build and install the libraries to access R.
How to do it…
There are two parts to setting up this system. We'll get the R-side working, and then we'll see what Clojure needs to have in place.
Setting up R
To set up the system, we first have to configure...