[Rcpp-devel] Rcpp matrix generation crashes my R session
Dirk Eddelbuettel
edd at debian.org
Sat Jun 22 21:28:43 CEST 2013
On 22 June 2013 at 20:34, Marc Jekel wrote:
| There was indeed a problem with the matrix index, thank you Dirk! And
| using "return Rcpp::wrap(weightsNet)" instead of "return weightsNet"
| helped to fix a problem when I created a R-package with the function
| included, thank you Simon!
You do not need wrap(X) when X is an Rcpp object such as a NumericMatrix; the
wrap function is called automagically for you (and we call that implicit wrap
use).
As Dale pointed out to you, you generally want simpler and simpler
sub-expression of your problem. And if and when you post a complete example
as you did (which is good -- thumbs up!) also post a mock data generator in R
that allows us to call it to actually make it __reproducible__.
Dirk
--
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
More information about the Rcpp-devel
mailing list