What Libraries and Inspirations Is Incanter Built On?

Updated

Incanter is a Clojure-based, R-like platform for statistical computing and graphics that runs on the JVM. Its technical foundation rests on a small set of Java numerics and visualization libraries, while its design lineage traces back to two earlier efforts to build statistical environments on top of Lisp: Lisp-Stat and the argument laid out in Ihaka and Lang's 2008 paper "Back to the Future: Lisp as a Base for a Statistical Computing System."

Core Libraries

Incanter's capabilities are assembled from established Java and Clojure libraries rather than written from scratch. According to the project's own description, the core components are:

Library Role in Incanter
Parallel Colt Numerics — a multithreaded version of the Colt library
JFreeChart Charting
Processing Visualization
Other Java and Clojure libraries Supporting functionality

These sit underneath Incanter's own feature set, which the project lists as charting and visualization functions, mathematical functions, statistical functions, matrix and linear algebra functions, and data manipulation functions.

The choice of Parallel Colt matters for what Incanter is good at: it brings multithreaded numerics to the JVM, so matrix and linear algebra work can use multiple cores without the user writing concurrency code.

Why Clojure and the JVM Matter Here

Incanter's pitch is that it combines two things that are usually separate:

  • Clojure — a dynamically-typed, functional programming language with sequence-oriented data structures, powerful sequence-processing functions, destructuring, and data structure literals.
  • The JVM library ecosystem — the collection of Java libraries for accessing, processing, and visualizing data.

The project's stated position is that Clojure's seamless Java integration makes leveraging these libraries much simpler than is possible in R, while Incanter's R-like semantics and interactive shell make statistical programming much simpler than is possible in pure Java. In other words, the library stack is the reason the JVM is worth targeting, and Clojure is the reason that stack is reachable without Java's usual verbosity.

Design Inspirations

Incanter is explicit about its intellectual ancestry:

  • Ihaka and Lang (2008), "Back to the Future: Lisp as a Base for a Statistical Computing System" — cited as the motivation for a Lisp-based, R-like statistical environment. Ross Ihaka is a co-creator of R, which gives the argument some weight: it is a case for Lisp as the substrate for statistical computing.
  • Lisp-Stat — described as "now dormant," and the subject of a special volume of the Journal of Statistical Software in 2005 titled "Lisp-Stat: Past, Present, and Future." Incanter is inspired by it.
  • Clojure — the motivation for a JVM-based Lisp is attributed to the Clojure project itself, with additional Clojure resources at clojuredocs.org.

So the lineage runs: Lisp-Stat and Ihaka/Lang's paper supply the idea of a Lisp-hosted statistical environment; Clojure supplies a modern, JVM-targeted Lisp; and Parallel Colt, JFreeChart, and Processing supply the numerics and graphics that make the idea usable.

What This Means If You're Evaluating Incanter

The library and inspiration list tells you something practical about fit:

  • If your work is matrix-heavy or linear-algebra-heavy, the Parallel Colt foundation is the relevant detail — it is multithreaded by design.
  • If you already work in Clojure or on the JVM, Incanter is designed to be embedded as a modular suite of libraries inside other analytics systems, not only used as a standalone interactive environment.
  • If you are coming from R, the R-like semantics and interactive shell are the intended bridge, but the underlying language and library access model are Clojure and Java.
  • If you are coming from pure Java, the appeal is the opposite direction: statistical programming expressed in a functional, dynamically-typed language instead of Java.

Getting the Code

The project points to a pre-built download, the source on GitHub, and a getting-started page. Incanter is also hosted on Clojars, so Leiningen- or Maven-based projects can add it as a dependency — a single line in a Leiningen project.clj, or a few lines of XML in a Maven pom.xml.