[Rcpp-devel] inline with classes

Dirk Eddelbuettel edd at debian.org
Sat Oct 9 13:46:32 CEST 2010


On 8 October 2010 at 23:26, Whit Armstrong wrote:
| Thanks again, Dirk.
| 
| full example (sorry for the verbose post):

Thanks for posting the full example! 

Let us know how you find it and how it helps you with CppBugs.

Just briefly:

| mat X(REAL(XR),100,2);
| mat y(REAL(yr),100,1);

Personally, I like to avoid all UPPERCASE macros but that looks like an
almost reasonable shortcut as you're going straight to Armadillo.

Also in

| fun <- cxxfunction(signature(XR="numeric", yr="numeric"), body=src,
| include=inc, plugin="Rcpp")

I would suggest trying plugin="RcppArmadillo" so that you get the Rcpp
to/from Armadillo data type wrapping etc.  There have been a few
RcppArmadillo examples posted on the list in response to other questions.

Cheers, Dirk

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com


More information about the Rcpp-devel mailing list