Skip to content
Back to formatted view

Raw Message

Message-ID: <19891.35328.302886.48323@max.nulle.part>
Date: 2011-04-24T02:25:04Z
From: Dirk Eddelbuettel
Subject: [Rcpp-devel] how to use functions from other packages
In-Reply-To: <19891.34180.356063.361036@max.nulle.part>

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:

      http://cran.r-project.org/web/packages/rgam/index.html

Hope this helps,  Dirk

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