The goal of lua51 is to …
You can install the development version of lua51 like so:
# FILL THIS IN! HOW CAN PEOPLE INSTALL YOUR DEV PACKAGE?
This is a basic example which shows you how to solve a common problem:
library(lua51)
## basic example code
See Rcpp for full details. This section simply
sets out some abbreviated notes. The package applies use_rcpp
from
usethis
in order to set up a C++ package.
usethis::create_tidy_package("lua51")
usethis::use_package_doc()
usethis::use_rcpp()
The package comprises a single Rcpp
module.
RCPP_MODULE(lua51) {
using namespace Rcpp;
}
But why C++ integration when Lua is pure C? The decision is one of style. All of the low-level Lua interface functions interact with a Lua ‘State’ encapsulating a single mutable Lua state machine. The design wraps this State into an object that you can instantiate using S6 class mechanisms. The S6 layer acts as a thin shim between R’s object world and the underlying Lua implementation.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.