Skip to content
Prev 9326 / 10988 Next

[Rcpp-devel] type mismatch between NumericMatrix and IntegerMatrix

In the latter case the integer matrix is "converted" to a numeric matrix
via a copy which is why your modification doesn't work.

That said, modifying an object in place violates R's language semantics and
could lead to incorrect computations (i.e. users expect that objects are
immutable and this is part of what ensures the integrity of computations)
so this is strongly discouraged.

On Sun, Aug 7, 2016 at 7:00 AM, Kaspar M?rtens <kaspar.martens at gmail.com>
wrote:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20160807/44d0d180/attachment.html>