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<br>I took care of the problem by using ui = Rcpp::as&lt;arma::mat&gt;(all_ui[i]) in the reaffectation<br>
<br>Thank you again all for your help<br><br><div class="gmail_quote">On Wed, Jun 15, 2011 at 11:00 PM, Dirk Eddelbuettel <span dir="ltr">&lt;<a href="mailto:edd@debian.org">edd@debian.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
On 15 June 2011 at 20:17, Nicolas Heslot wrote:<br>
| Any idea about this variable reaffectation thing?<br>
<br>
</div>Well ... that still make little sense. Variables are not protected; there is<br>
nothing stopping you from re-assigning values, be it element-wise, row or<br>
column-wise, or as a whole matrix. So I suspect you have a simple syntax<br>
error.<br>
<br>
But as you still have not shown an actualy error it remains idle speculation<br>
on our side.<br>
<div class="im"><br>
| It seems to be specific to arma classes like arma::mat<br>
<br>
</div>Not really. We all use these and read values from / assign values into at<br>
will.  There are numerous examples in the archives of this mailing list, in<br>
the unit tests, and in some of the slides from past presentations.<br>
<br>
Dirk<br>
<font color="#888888"><br>
--<br>
</font><div><div></div><div class="h5">Gauss once played himself in a zero-sum game and won $50.<br>
                      -- #11 at <a href="http://www.gaussfacts.com" target="_blank">http://www.gaussfacts.com</a><br>
</div></div></blockquote></div><br>