I want to use RcppGSL and RcppArmadillo at the same time, is it possible to use several plugins in cxxfunction (built-in CRAN package)? I found a way to do:
plug.ArmaGSL <- Rcpp:::Rcpp.plugin.maker(include.before='#include <RcppArmadillo.h> #include <RcppGSL.h> #include <gsl/gsl_rng.h>', Depends=c("RcppGSL", "RcppArmadillo", "Rcpp"), LinkingTo=c("RcppGSL", "RcppArmadillo", "Rcpp"), libs="-lgsl -larmadillo") registerPlugin("RcppArmaGSL", plug.ArmaGSL) foo <- cxxfunction(signature(sM="numeric"), body=bodytxt, inc=inctxt, plugin="RcppArmaGSL")
but it does not seem intuitive.
source share