Learn R Programming

cxxfunplus (version 1.0.2)

cxxfunctionplus: 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)

Value

An object of S4 class cxxdso.

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 getPlugin for details about plugins.

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

See Also

cxxfunction and cxxdso

Examples

Run this code
if (FALSE) {
src <-  ' return ScalarReal(INTEGER(x)[0] * REAL(y)[0]);'
dso <- cxxfunctionplus(signature(x = "integer", y = "numeric"), src)
show(dso)
}

Run the code above in your browser using DataLab