[Rcpp-devel] multiple function when using Inline

Noah Silverman noahsilverman at ucla.edu
Thu Oct 20 09:53:32 CEST 2011


That makes sense.

I have only one R facing function from the C++.  It is just inside my C++ that I want to call a few things.

I'm not too clear on how to include the other c++ functions.  Is there a good example of this somewhere?

Thanks!

--
Noah Silverman
UCLA Department of Statistics
8208 Math Sciences Building
Los Angeles, CA 90095

On Oct 20, 2011, at 12:42 AM, Romain François wrote:

> 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/9e123994/attachment-0001.htm>


More information about the Rcpp-devel mailing list