Skip to content
Clojure speaks statistics - a library for connecting Clojure to R
Clojure R
Branch: master
Clone or download
Latest commit 32ad2d2 Oct 14, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
R initial commit: basic Renjin wrappers Jun 12, 2019
doc README, docs Sep 24, 2019
examples put the examples in a separate project Sep 23, 2019
src minor addition to API Oct 14, 2019
test fixed session management, added shiny example Sep 22, 2019
.gitignore initial commit: basic Renjin wrappers Jun 12, 2019
LICENSE initial commit: basic Renjin wrappers Jun 12, 2019 README Oct 14, 2019
project.clj updated deps Sep 23, 2019


Clojure speaks statistics - a library for connecting Clojure to R


At the moment, everything is alpha, and will keep changing. We find it important to experiment with the API for some time, and go through several community discussions till anything stabilizes.

However, in few days we will stabilize a first version of the API.

Scope of the project

There are already stable libraries for Clojure-R interop -- see this list.

This project suggests yet another way to use R from Clojure.

Currently we target only JVM Clojure, but we are interested in generalizing the work to Clojurescript.

The related problem, of calling Cojure from R, may be addressed too in the future. We are experimenting with that.

Video presentation

Scicloj Web meeting #7

Why this name?

Clojure Speaks Statistics is a homage to Emacs Speaks Statistics.

Meta Goals

  • Realize what is essential for Clojure to become a beginner-friendly solution for data science.

  • Expose the Clojure ecosystem to a different culture and to more diverse groups of users/programmers.

Technical Goals

  • A Function-centric API, where the default mode of usage is calling R functions on R objects, from Clojure (Status: a draft exists, it will change)

  • "R code as Clojure data", using and extending the EDN-based syntax inroducted in gg4clj and used in huri (Status: currently experimenting with the original gg4clj syntax)

  • Interop with minimal copying of data (Status: supported)

  • Compatibility with common data abstractions such as datasets (Status: partial support)

  • Convenient wrappers for common use cases, such as visualization (Status: wrote a basic wrapper to Rmarkdown)

  • Abstraction over different runtimes (GNUR R, Renjin, FastR) (Status: only GNU R is supported to the momentnot there yet; planning to look into Renjin soon)

  • Convenient multi-session support (Status: a draft exists, needs some polish)


  • Linux or MacOS

  • R

  • The Rserve R package (install.packages("Rserve"))

  • This project (currently changing)

Clojars Project



API Draft

For now, see the basic example and the tests of the clojuress namespace.

The API may still change, hopefully after some good ideas in community discussions.


  1. Lisp for statistical computing

  2. Calling R from Clojure: existing libraries

  3. R backends

  4. Some of R's data abstractions

  5. Clojure's counterparts of R's data abstractions

Choices of the current project

Here are the current priorities of the project in some central design and implementation questions.

Future opportunities

Here are some possible future developments we are considering.


Please share your comments, thoughts, ideas and questions at the Issues Page of this project and at the r-interop stream of the Clojurians Zulip.

Tools used

Working on this project, we enjoyed the following tools (partial list):


Copyright © 2019 Scicloj

This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at

This Source Code may also be made available under the following Secondary Licenses when the conditions for such availability set forth in the Eclipse Public License, v. 2.0 are satisfied: GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version, with the GNU Classpath Exception which is available at

You can’t perform that action at this time.