rex2arma-package | R Documentation |
Automatic conversion of basic R code (straightforward mathematical formulas and alike) into RcppArmadillo code.
Package: | rex2arma |
Type: | Package |
Version: | 0.7.1 |
Date: | 2023-04-20 |
License: | GPL (==2) |
Principal function is rex2arma().
Few examples are provided in Sys.glob(file.path(system.file("examples", package="rex2arma"), "ex_*.R"))
Author: Serguei Sokol
Maintainer: <sokol@insa-toulouse.fr>
Rcpp
x=rnorm(3) # make x a short vector of reals for prototyping
vadd_one=function(x) x+1
code=rex2arma(vadd_one, exec=0)
cat(code)
# or directly
#cat(rex2arma("x+1", fname="vadd_one_bis", exec=1)) # commented for time saving during tests
#vadd_one_bis(1:10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.