[Rcpp-devel] Using loess() from Rcpp

Dirk Eddelbuettel edd at debian.org
Sat Apr 3 06:25:43 CEST 2010


On 1 April 2010 at 17:04, Davor Cubranic wrote:
| Has anyone here used R curve-fitting from Rcpp? Like loess(), for example?
| Reading the R code, after a couple of layers of preliminaries to extract all
| the required parameters, it ends up in C (loess_raw) and Fortran (lowesw and
| lowesp). 

I read your mail briefly while I was gone [ which included two well-received
talks about Rcpp / RInside on the west coast :) ], and now that I got back
into town I still don't fully understand what you want.

You do have function objects, as well as examples/functionCallback/ -- is
that good enough?  It allows you to call just about any R function via Rcpp,
but of course it doesn't magically make it faster.

And in case you are coming from C++ rather than R: look at RInside.

| It would be nice if there were already code out there that gives me a
| tidier interface that I could use instead of transcribing the R wrapper
| into C. And even cooler if R's 'formula' DSL had a C++ equivalent... 

Well but R source was written to be used from R so ... I still don't quite
understand what you are expecting.  That Rcpp rewrites all of R for you?

Anyway, Romain kindly added formula objects to Rcpp as well. So maybe that
will help you along, and more examples or use cases would be fine too.

Cheers, Dirk

-- 
  Registration is open for the 2nd International conference R / Finance 2010
  See http://www.RinFinance.com for details, and see you in Chicago in April!


More information about the Rcpp-devel mailing list