Running compiled C++ code with Rcpp
问题 I have been working my way through Dirk Eddelbuettel's Rcpp tutorial here: http://www.rinfinance.com/agenda/ I have learned how to save a C++ file in a directory and call it and run it from within R. The C++ file I am running is called 'logabs2.ccp' and its contents are directly from one of Dirk's slides: #include <Rcpp.h> using namespace Rcpp; inline double f(double x) { return ::log(::fabs(x)); } // [[Rcpp::export]] std::vector<double> logabs2(std::vector<double> x) { std::transform(x.begin