Skip to content
The Scala interpreter is embedded in R and callbacks to R from the embedded interpreter are supported. Conversely, the R interpreter is embedded in Scala.
R Scala TeX Shell
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.
benchmarks Preparing 2.3.7 release. May 11, 2019
others/hanyu-song Better. Jul 27, 2018
project Move to address issues with ERRORs on Windows because Scala is not in… Feb 6, 2020
reverse-dependencies Bug fixes Oct 31, 2018
scratch Deleted unneeded file. Nov 4, 2018
src/main Removed functionality associated with scalaJARs function. Jul 10, 2019
.gitignore Documentation clean up Jul 9, 2019
LICENSE Added LICENSE file as per issue #6 by pcejrowski Jan 22, 2018 Movement Oct 26, 2018
release-procedure Version 3.2.17 Feb 6, 2020

rscala: Bridge Between 'R' and 'Scala' with Callbacks

By David B. Dahl (Brigham Young University)

The rscala package provides a bridge between R and Scala, enabling a user to exploit each language's respective strengths in a single project. The rscala package brings Scala and Java libraries into R with a simple interface. Specifically, Scala classes can be instantiated and methods of Scala classes can be called directly. Furthermore, arbitrary Scala code can be executed on the fly from within R and callbacks to R are supported. Conversely, rscala also enables arbitrary R code to be embedded within a Scala application.


In R, install the package by executing:


To install --- or check the compatability of your existing installation of --- Scala and Java, please execute:


Note that if only want to embed R in a Scala application, you don't need to install the package. Simply add the following line to the your SBT build.sbt file:

libraryDependencies += "org.ddahl" %% "rscala" % "3.2.18"

Usage guides

The original paper describing the software is:

D. B. Dahl (2020), Integration of R and Scala using rscala, Journal of Statistical Software, 92:4, 1-18, doi:10.18637/jss.v092.i04.

The citation information is available using:


An updated version of the paper is available here or as a vignette in R (once the package is installed):


The functionality of the software is also described and demonstrated in the help files:


Example packages built with rscala

R extensions can be written using this package, as demonstrated by these packages:


You can’t perform that action at this time.