v_function | R Documentation |
v_function
transpiles the supplied v
code to C
, compiles it,
and returns a R function that calls the compiled code.
Rcpp::cppFunction
, but for v
.
v_function(code, verbose = FALSE)
code |
|
verbose |
if |
Note: R specific classes in v
can be found in the r
module.
R function that will call the compiled code
## Not run: # create a compiled function with v code f <- v_function("fn add_one(i int) int { return i + 1 }") # and use it in R add_one(2) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.