Database Reference
In-Depth Information
3.
Change into the src/client/java subdirectory of the Rserve directory:
$ cd Rserve/src/client/java/
4.
Run make to create the JAR iles:
$ make
5. Use Maven to install the two JAR iles in that directory into your local Maven
repository, as shown here:
$ mvn install:install-file -Dfile=./REngine.jar \
-DartifactId=REngine -Dversion=1.88.1 -DgroupId=local.repo \
-Dpackaging=jar
$ mvn install:install-file -Dfile=./Rserve.jar \
-DartifactId=Rserve -Dversion=1.88.1 -DgroupId=local.repo \
-Dpackaging=jar
6.
Start R and install the package, as follows:
> install.packages("Rserve")
--- Please select a CRAN mirror for use in this session ---
At this point, a dialog window will pop up with a list of mirrors. Select one near you,
and R will download the package and install it.
7.
While still in R, load and start the Rserver. The code for this chapter has a shell script,
start-rserve.sh , that starts the Rserver. You can also download the script from
https://gist.github.com/erochest/4974005 .
$ ./start-rserve.sh
R version 2.15.2 (2012-10-26) -- "Trick or Treat"
...
Rserv started in daemon mode.
Setting up Clojure
Now we need to turn our attention to Clojure.
1. First, we must declare the two JAR iles that we just installed as dependencies in our
Leiningen project.clj ile:
(defproject interop "0.1.0-SNAPSHOT"
:description ""
:dependencies [[org.clojure/clojure "1.6.0"]
[incanter "1.5.5"]
[local.repo/REngine "1.8.1"]
[local.repo/Rserve "1.8.1"]])
 
Search WWH ::




Custom Search