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 | [email protected] | http://dirk.eddelbuettel.com _______________________________________________ Rcpp-devel mailing list [email protected] https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
