Once we've gone to the work of slicing, dicing, cleaning, and aggregating our datasets, we might want to save them. Incanter by itself doesn't have a good way to do that. However, with the help of some Clojure libraries, it's not difficult at all.
We'll need to include a number of dependencies in our project.clj
file.
:dependencies [[org.clojure/clojure "1.4.0"] [incanter "1.4.1"] [org.clojure/data.json "0.2.1"] [org.clojure/data.csv "0.1.2"]]
We'll also need to include those libraries in our script or REPL.
(use '(incanter core io)) (require '[clojure.data.csv :as csv] '[clojure.data.json :as json] '[clojure.java.io :as io])
We'll be using the same data file that we introduced in the Selecting columns with $ recipe.