lua {luajr}R Documentation

Run Lua code

Description

Runs the specified Lua code.

Usage

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

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.

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.

Examples

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

[Package luajr version 0.1.7 Index]