[1] 2 4 6 8
The intent was to overlay miobj$A with the Armadillo cube aF within
C++ function test4, so that changes in miobj$A triggered by calling
miobj$update (v?a fn() inside test4) would be seen in aF.
However, this is not the case: miobj$A is multiplied by 2, as it
should, but aF remains unaltered. One of the problems (perhaps not the
only one) is that miobj$A keeps changing place whenever is assigned (I
was using a reference class in the hope that the memory used by objects
would not change).
So the question is: Is there a way to invoke from a C++ function an R
function which modifies an R object, and see the results reflected in a
C++
object immediately, without copying?
Grateful for any hints or leads on where to look. Best, ft.