Hello list,<br>looking at Rcpp::DataFrame in <a href="http://gallery.rcpp.org/tags/dataframe/">the gallery</a> I realized that I didn't know how to modify a DataFrame by reference. Googling a bit I found <a href="http://stackoverflow.com/questions/13773529/passing-a-data-table-to-c-functions-using-rcpp-and-or-rcpparmadillo">this post on SO</a> and this <a href="http://www.mail-archive.com/rcpp-devel@lists.r-forge.r-project.org/msg04919.html">post on the archive</a>.<br>
There is nothing obvious so I suspect I miss something big like "It is already the case because" or "it does not make sense because".<br><br>I tried the following which compiled but the data.frame object passed to   updateDFByRef in R stayed untouched<br>
<br>#include <Rcpp.h><br>using namespace Rcpp;<br><br>// [[Rcpp::export]]<br>void updateDFByRef(DataFrame& df) {<br>    int N = df.nrows();<br>    NumericVector newCol(N,1.);<br>    df["newCol"] = newCol;<br>
    return;<br>}<br><br>Could somebody explain me what I am missing or kindly point me to a document where I can find the explanation ?<br><br>Cheers<br>