cxxfunctionplus {cxxfunplus} | R Documentation |
To created an S4 class cxxdso
from C++ code
Description
This is a wrap-up of function cxxfunction
in package inline.
Additionally, this function returns an object of class cxxdso
,
which could be saved and reused across R sessions. All arguments except
save.dso
are passed to function cxxfunction
.
Usage
cxxfunctionplus(sig = character(), body = character(),
plugin = "default", includes = "",
settings = getPlugin(plugin),
save.dso = FALSE, ..., verbose = FALSE)
Arguments
sig |
Signature of the function. A named character vector |
body |
A character vector with C++ code to include in the body of the compiled C++ function |
plugin |
Name of the plugin to use. See |
includes |
User includes, inserted after the includes provided by the plugin. |
settings |
Result of the call to the plugin |
save.dso |
Determine whether to save the compiled code (DSO). |
... |
Further arguments to the plugin |
verbose |
verbose output |
Value
An object of S4 class cxxdso
.
See Also
cxxfunction
and cxxdso
Examples
## Not run:
src <- ' return ScalarReal(INTEGER(x)[0] * REAL(y)[0]);'
dso <- cxxfunctionplus(signature(x = "integer", y = "numeric"), src)
show(dso)
## End(Not run)
[Package cxxfunplus version 1.0.2 Index]