Несколько подключаемых модулей в cxxfunction

Я хочу использовать RcppGSL и RcppArmadillo одновременно, возможно ли использовать несколько подключаемых модулей в cxxfunction (встроенного CRAN упаковка) ? Я нашел способ сделать:

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")

но это кажется не таким интуитивным.

5
задан Gong-Yi Liao 24 April 2012 в 19:27
поделиться