Description Usage Arguments Value Author(s) See Also
This is a simple function that generates a compiled
routine that we can call to invoke the native routine.
We can already do this with rdyncall
or Rffi
. However, this is another
approach that uses LLVM.
It is not clear we actually need this. We can call existing routines directly (except with ...) via .llvm. See the example on the Function page.
1 2 3 | createProxy(name, returnType, types = list(), id = sprintf("r%s", name),
mod = Module(name), ee = ExecutionEngine(mod),
env = globalenv(), sym = getNativeSymbolInfo(name)$address, ...)
|
name |
the name of the routine to which we are interfacing |
returnType |
the return type of the routine to which we are interfacing |
types |
the parameter types of the target routine |
id |
the name of the R routine |
mod |
the LLVM module in which to create the routine |
ee |
the LLVM execution engine |
env |
the environment for the R function |
sym |
the address of the routine to which we are interfacing |
... |
additional arguments |
The compiled routine that calls the native routine.
Duncan Temple Lang
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.