Hello everyone,<br><br>I am testing my code and find something that I hope someone can conform for me. Thanks in advance. It seems to me that<br><br>NumericVector x = as&lt;NumericVector&gt;(x_); ( Btw, this is exactly the same as NumericVector x(x_), both resulting in a shallow copy, isn&#39;t it? ) produces a shallow copy, while<br>
vector&lt;double&gt; x = as&lt; vector&lt;double&gt; &gt;(x_); produces a deep copy.<br><br>Is it because for NumvericVector the as() function returns the address of x_? But why does it work differently for vector&lt;double&gt;?<br>
<br>Thank you for your answer.<br><br>Best,<br>Zhongyi<br>