Re: [Rcpp-devel] Working with modules

2015-06-04 Thread Dirk Eddelbuettel
On 4 June 2015 at 16:35, Wagner Bonat wrote: | Dear all, | | I am reading the Rcpp book Chapter 7 - Modules | | The first example provide a C++ function | | ## C++ function | double norm( double x, double y){ |     return sqrt(x*x + y*y); | } | | ## Simple wrapper function | using namespac

[Rcpp-devel] Working with modules

2015-06-04 Thread Wagner Bonat
Dear all, I am reading the Rcpp book Chapter 7 - Modules The first example provide a C++ function ## C++ function double norm( double x, double y){ return sqrt(x*x + y*y); } ## Simple wrapper function using namespace Rcpp; RcppExport SEXP norm_wrapper(SEXP x_, SEXP_y){ double x = as