Runs the specified Lua code.
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)
#> [1] 12