Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Clojure-based, R-like statistical computing and graphics environment for the JVM
branch: nonparallel

This branch is 1220 commits behind incanter:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
data
docs/api
examples
lib
src/incanter
tests
README.textile
build.xml
epl-v10.html

README.textile

Incanter

Incanter is a Clojure based, R like statistical computing and graphics environment for the JVM.

Motivation for a Lisp-based R-like statistical environment can be found in the paper Back to the Future: Lisp as a Base for a Statistical Computing System by Ihaka and Lang.

Motivation for a JVM-based Lisp can be found at the Clojure website, and screencasts of several excellent Clojure talks by the language’s creator, Rich Hickey, can be found at clojure.blip.tv.

Finally, the motivation for creating Incanter is to provide R-like semantics (if not always syntax) to the development of standalone statistical applications (with web or gui front-ends), as well as to the development of statistical applications that need to plug into an existing software infrastructure in order to consume data (from databases or other information systems) or drive other processes. Clojure’s seemless integration with Java makes this kind of development much simplier than is possible in R, and Incanter’s R-like semantics makes it much simplier than is possible in pure Java.

Additional Clojure resources

To build and use Incanter, run the following commands from the Incanter directory:

  • Build incanter.jar: ant
  • Run unit tests: tests/runtests.clj
  • Generate API docs: bin/generate_docs.clj
  • Start the Clojure shell (aka the REPL) from the Incanter directory: bin/clj
  • From the Clojure shell, load the Incanter libraries:
    (use '(incanter core stats datasets charts)) 
  • Sample 1,000 values from a standard-normal distribution and view a histogram:
    (view (histogram (sample-normal 1000))) 
  • See the next section for more examples

(Note: the bin/clj and *.clj scripts won’t run on Windows systems as is. Although, the Clojure code contained in the *.clj scripts can be run from the Clojure shell.)

Incanter examples

  • The online documentation for most functions contain usage examples. The documentation can be accessed using Clojure’s doc function. For example, to view the documentation for the linear-model function, use (doc linear-model) from the Clojure shell. The API documentation is also available in docs/api/index.html and online at incanter.org/docs/api/. Use (find-doc "search term") to search the online documentation from the Clojure shell.
  • See examples/ directory
  • See tests/test-cases.clj

Documentation

Included dependencies

Something went wrong with that request. Please try again.