Skip to contents

luajr provides an interface to LuaJIT, a just-in-time compiler for the Lua scripting language. It allows users to run Lua code from R.

One of the advantages of using luajr is that LuaJIT runs Lua code with very fast compilation times, fast execution times, and no need for an external toolchain, as the LuaJIT compiler is “built in” to the luajr package. This contrasts with e.g. Rcpp, which results in compiled code with very fast execution times but slow compilation times and the need to invoke an external C++ compiler toolchain like gcc or clang.


You can install the released version of luajr from CRAN with:

You can install the development version of luajr from GitHub with:

# install.packages("devtools")

Under development

luajr is under early development. As such, the interface and behaviour of the package is subject to change.