[Rcpp-devel] how to use functions from other packages

Dirk Eddelbuettel edd at debian.org
Sun Apr 24 04:25:04 CEST 2011

On 23 April 2011 at 21:05, Dirk Eddelbuettel wrote:
| On 23 April 2011 at 20:36, Siddhartha Chib wrote:
| | This is likely to be too simple a question perhaps.  How does one use specific
| | functions from other packages when working with Rcpp?  For that matter, is it
| | possible to use R functions such as optim in Rcpp? 
| Yes, sure. I don't think we have a great example though.  
| A concise example would be good.  Maybe another list member has something?

PS This may be obvious too, but let's just state it plainly to be sure: in
   iterative optimisation, if you repeatedly go back between R and C++ you
   are likely to give up a bunch of the speed gain Rcpp can otherwise offer.
   There are other tricks one can use to access the _C_ part of certain R
   functions.  Frequent list contributor Davor had done some nice work getting
   at the inner (C language) part of loess(); that is now also in a CRAN
   package 'rgam' which uses Rcpp and RcppArmdillo:


Hope this helps,  Dirk

Gauss has an Erdos number of -1.
   -- #63 at http://www.gaussfacts.com

More information about the Rcpp-devel mailing list