[Rcpp-devel] multiple function when using Inline

Romain François romain at r-enthusiasts.com
Thu Oct 20 09:42:30 CEST 2011


Hello,

You are crossing the boundary when it really starts to make sense to 
make a package.

If you only have one R facing C++ function calling other C++ functions, 
then you can abuse the includes argument of cxxfunction to embed as many 
C++ functions as you like. Having multiple R facing functions is a 
little more gymnastic, and rather than explain that, I would prefer you 
to go down the package route.

HTH,

Romain

Le 20/10/11 08:50, Noah Silverman a écrit :
> Hi,
>
> I've started using Rcpp + inline for some of my code.  It is amazingly 
> fast.
>
> However, I have need for a few c++ functions. (One main needs to call 
> a few other functions.)  At this point, I don't need separate classes, 
> just the ability to have multiple functions.  (Coding up several 
> separate R functions using Inline would be ineffecient as the data 
> would need to pass between R and C++ several times on each iteration 
> of a rather large loop.
>
> While this is trivial in C++, is it possible in R using the the 
> Rcpp+Inline?
>
>
>
> --
> Noah Silverman
> UCLA Department of Statistics
> 8208 Math Sciences Building
> Los Angeles, CA 90095
>
>
>
> _______________________________________________
> Rcpp-devel mailing list
> Rcpp-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel


-- 
Romain Francois
Professional R Enthusiast
http://romainfrancois.blog.free.fr

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20111020/82fa5267/attachment.htm>


More information about the Rcpp-devel mailing list