This function is used in the itp package to create external pointers to the C++ functions used as examples to illustrate the use of the function itp. These pointers are passed as the argument f to itp. To create their own examples the user will need to create their own C++ function(s) and a function that is similar to xptr_create.

xptr_create(fstr)

Arguments

fstr

A string indicating the C++ function required.

Value

The external pointer.

Details

See the vignette Overview of the itp package and the file user_fns.cpp for information.

The example C++ functions available in itp are: "wiki", "lambert", "trig1", "poly3", "linear", "warsaw" and staircase.

See also

xptr_eval for calling a C++ function using an external pointer.

Examples

lambert_ptr <- xptr_create("lambert")
res <- itp(lambert_ptr, c(-1, 1))