[Rcpp-devel] variable affectation in Rcpp Rcpp Armadillo

Nicolas Heslot nh269 at cornell.edu
Thu Jun 16 05:57:33 CEST 2011

I finally figured out, it was a syntax error, as the new assigned object was
not an arma:: mat but an element from a list
I took care of the problem by using ui = Rcpp::as<arma::mat>(all_ui[i]) in
the reaffectation

Thank you again all for your help

On Wed, Jun 15, 2011 at 11:00 PM, Dirk Eddelbuettel <edd at debian.org> wrote:

> On 15 June 2011 at 20:17, Nicolas Heslot wrote:
> | Any idea about this variable reaffectation thing?
> Well ... that still make little sense. Variables are not protected; there
> is
> nothing stopping you from re-assigning values, be it element-wise, row or
> column-wise, or as a whole matrix. So I suspect you have a simple syntax
> error.
> But as you still have not shown an actualy error it remains idle
> speculation
> on our side.
> | It seems to be specific to arma classes like arma::mat
> Not really. We all use these and read values from / assign values into at
> will.  There are numerous examples in the archives of this mailing list, in
> the unit tests, and in some of the slides from past presentations.
> Dirk
> --
> Gauss once played himself in a zero-sum game and won $50.
>                      -- #11 at http://www.gaussfacts.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20110615/fc2185b3/attachment.htm>

More information about the Rcpp-devel mailing list