createRegistrationCode | R Documentation |
This is a high-level function to find the routines in C/C++ code that can be invoked via R's .C or .Call interface and then to generate the C code to register these routines along with the number of parameters and their type information.
createRegistrationCode(dir, pkg = basename(dirname(dir)),
routines = getCallableRoutines(dir, ...), ...)
dir |
the directory containing the source code. |
pkg |
the name of the package or DLL containing the native code. This is used when creating the name of the initialization routine that R will look for and invoke. This defaults to the name of the parent directory which corresponds to the case where the code is in the src/ directory of a package and the parent directory is the root of the package structure. |
routines |
the collection of .C and .Call invocable routines |
... |
additional parameters such as |
A string that contains the C code for registering the routines along with the data declarations it uses.
Duncan Temple Lang
getCallableRoutines
code = createRegistrationCode(system.file("exampleCode", package = "RCIndex"), "MyPkg")
cat(code, sep = "\n")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.