[Rcpp-devel] Using Armadillo objects as arguments in calls to R

Davor Cubranic cubranic at stat.ubc.ca
Wed May 12 01:41:25 CEST 2010


No, sadly. I still get a segfault if any of the variables 'x', 'y', or 'weights' below are 'wrap'ped.

Davor


On 2010-05-11, at 1:30 PM, Dirk Eddelbuettel wrote:

> 
> On 11 May 2010 at 13:17, Davor Cubranic wrote:
> | Hmm, once I stopped using 'wrap' and just passed Armadillo objects using 'Named', I'm able to run unit tests with no errors.
> | 
> | I.e., I now use:
> | 
> |   List data = List::create(_["x"] = x,
> | 			   _["y"] = y);
> |   const NumericVector out_r = predict_fn(loess_fn(formula_fn("y~x"),
> | 						  data,
> | 						  _["weights"] = weights,
> | 						  _["span"] = span));
> | 
> | Could the issue really have been caused my using 'wrap'? What does 'wrap' do that would lead to a segfault, that I now avoid by using 'Named'?
> | 
> | Davor
> | (R 2.10.1, Rcpp 0.7.11, Armadillo 0.9.4)
> 
> Could you see whether anything different happens with Rcpp 0.7.12 ?
> 
> -- 
>  Regards, Dirk



More information about the Rcpp-devel mailing list