xptr_create | R Documentation |
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)
fstr |
A string indicating the C++ function required. |
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
.
The external pointer.
xptr_eval
for calling a C++ function using an
external pointer.
lambert_ptr <- xptr_create("lambert")
res <- itp(lambert_ptr, c(-1, 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.