Learn R Programming

luajr (version 0.1.8)

lua: Run Lua code

Description

Runs the specified Lua code.

Usage

lua(code, filename = NULL, L = NULL)

Value

Lua value(s) returned by the code block converted to R object(s). Only a subset of all Lua types can be converted to R objects at present. If multiple values are returned, these are packaged in a list.

Arguments

code

Lua code block to run.

filename

If non-NULL, name of file to run.

L

Lua state in which to run the code. NULL (default) uses the default Lua state for luajr.

Examples

Run this code
twelve <- lua("return 3*4")
print(twelve)

Run the code above in your browser using DataLab