Skip to content
Prev 5441 / 10988 Next

[Rcpp-devel] Initiate NumericMatrix in class constructor from S4 slot

There is no constructor of Matrix tht takes a SlotProxy. You can do it in two steps perhaps. 

SEXP tmp = classS4.slot("M_R") ;
M = tmp ; 

Or use a specific cast:
In any case, you should use an initialisation list in your constructor anyway, something like:
Hiwever, i will add the missing constructor if this does not break anything else. 

Romain

Le 6 mars 2013 ? 08:14, Simon Zehnder <szehnder at uni-bonn.de> a ?crit :