What Features Does Incanter Provide for Statistical Computing and Graphics?
Updated
Incanter is a Clojure-based, R-like platform for statistical computing and graphics. It can be used either as a standalone, interactive data analysis environment or embedded within other analytics systems as a modular suite of libraries. Its feature set is organized into four main areas: charting and visualization, mathematical functions, statistical functions, and matrix and linear algebra functions, plus data manipulation functions.
Charting and Visualization
Incanter provides charting and visualization functions built on top of the JFreeChart charting library and the Processing visualization library. These libraries give Incanter its graphics capabilities while running on the JVM.
Mathematical and Statistical Functions
Incanter ships with dedicated mathematical functions and statistical functions. Because it is designed as an R-like environment, these functions support interactive, dynamic, functional statistical programming on the JVM.
Matrix and Linear Algebra
Matrix and linear algebra functions are included as a core feature area. At the numeric core, Incanter relies on the Parallel Colt numerics library, a multithreaded version of Colt.
Data Manipulation
Incanter includes data manipulation functions for working with datasets. This area benefits from Clojure itself, which is well suited to data processing through its sequence-oriented data structures, powerful sequence-processing functions, destructuring, and data structure literals.
The Underlying Stack
Incanter combines Clojure with a set of Java and Clojure libraries:
| Component | Role |
|---|---|
| Parallel Colt | Multithreaded numerics library (version of Colt) |
| JFreeChart | Charting library |
| Processing | Visualization library |
| Clojure | Dynamically-typed, functional programming language |
Clojure's seamless integration with Java makes leveraging these libraries simpler than is possible in R, while Incanter's R-like semantics and interactive shell make statistical programming simpler than in pure Java.
Design Background
Incanter's motivation draws on Back to the Future: Lisp as a Base for a Statistical Computing System by Ihaka and Lang (2008), and it is also inspired by the now dormant Lisp-Stat.
Getting Started
You can download a pre-built version of Incanter, or get the latest source code from the GitHub repository, then visit the getting started page. Incanter is also hosted on Clojars for those using Leiningen or Maven-based tools to build Clojure applications, and can be included as a dependency with a single line in a Leiningen project.clj file or a few lines of XML in a Maven pom.xml file.