Hello to everyone I have written a small c++ function of type double function(double,double); and i want to export it in R using RCPP. After some trials i have realized that the only way i could do it working is to declare the function as void function (double x, double y, double result) and pass the result with RCPP Can you please tell me if this is the only way out? And if this is the case how I can implement a function with is recurence property eg a Factorial funtion int factorial (int a){ a=factorial(a-1);}
tnks in advance for your help -- View this message in context: http://r.789695.n4.nabble.com/Export-a-function-from-RCPP-in-R-of-type-double-tp3567793p3567793.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.