I thought my #Rcpp code was screwy, but now I find I'm not doing deep copy properly with my R objects - easiest way I've found so far is to save to file and reload - there must be a better way!?!?
1
1
Replying to @franticspider
You probably want Rcpp::clone. Quick example below, note how the internal address changes because we invoke Rcpp::clone(). #rstats #Rcpp

Apr 15, 2021 · 7:31 PM UTC

1
1
4
Replying to @eddelbuettel
Thanks for taking the time to explain that Dirk, I'm learning! However I have a more complex data structure: a list containing two dataframes - so is the best approach to develop what you suggested to copy each column of the dataframe and then regenerate the list..?
1