Learn R Programming

luajr: LuaJIT Scripting

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.

Installation

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

install.packages("luajr")

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

# install.packages("devtools")
devtools::install_github("nicholasdavies/luajr")

Under development

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

Copy Link

Version

Install

install.packages('luajr')

Monthly Downloads

175

Version

0.1.8

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Nicholas Davies

Last Published

July 1st, 2024

Functions in luajr (0.1.8)

luajr-package

luajr: LuaJIT Scripting
lua_open

Create a new Lua state
lua_parallel

Run Lua code in parallel
lua

Run Lua code
lua_func

Make a Lua function callable from R
lua_shell

Run an interactive Lua shell
lua_reset

Reset the default Lua state