After the last recipe, we should be able to execute Mathematica functions from Clojure. We'll also need to send data to Mathematica so that there's something to call those functions on.
We must first have Clojuratica and Mathematica talking to each other. Either complete the Setting up Mathematica to talk to Clojuratica for Mac OS X and Linux recipe or the Setting up Mathematica to talk to Clojuratica for Windows recipe. Also, you'll need to have called the init-mma
function.
We'll also need to have Incanter listed in the dependencies in our project.clj
file.
:dependencies [[org.clojure/clojure "1.4.0"] [local.repo/JLink "9.0"] [incanter "1.4.1"]
And we'll require those namespaces in our script or REPL.
(use 'clojuratica) (require '[incanter.core :as i] 'incanter.io)
Finally, we'll use the dataset of racial census data that we compiled for the Grouping Data with $group-by recipe in Chapter 6...