I have written a code in C++ which uses boost library and also uses multiple files. I am trying to execute the function in R.
Here is my C++ function prototype:
Use Rcpp instead of .Call.
Add this headers and comment to your .cpp function file:
#include
using namespace Rcpp;
// [[Rcpp::export]]
And now in R:
install.packages("Rcpp")
library(Rcpp)
sourceCpp('path to your .cpp program')
The function EulerInversions should become visible in the environment and you can call it now as any other R function