<meta charset="utf-8"><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">I use RInside and Rcpp packages to make a few R calls from C++ for a bioinformatics project I'm doing. I'm trying to get my code working on a big cluster on campus to speed up the analysis I need to do on real data now that my methodological development is done. The admins for that cluster were only able to get RInside 0.2.1, and I think Rcpp 0.7.9 (maybe 0.7.8?) compiled properly. This has meant that operator[] has disappeared.<div>
<br></div><div>I was setting up my R instance with the standard:</div><div><br></div><div>RInside R(0, NULL);</div><div><br></div><div>And then was creating Rcpp::NumericVector instances, filling them, then doing:</div><div>
<br></div><div>R["<a href="http://var.name/" target="_blank" style="color: rgb(28, 81, 168); ">var.name</a>"] = my_numeric_vector;</div><div><br></div><div>How do I accomplish this assignment in the older versions? I've been looking through the header files at the assign functions, but:</div>
<div><br></div><div>R.assign(my_numeric_vector, "<a href="http://var.name/" target="_blank" style="color: rgb(28, 81, 168); ">var.name</a>");</div><div><br></div><div>doesn't work, as there are only assign functions defined to take standard STL vectors as the thing to be assigned to the given variable name in the R instance. Do I have to rewrite the code so the NumericVector instances are just std::vector<double> instances? Is there some other function other than the assign functions that I can use? Is there a built in function in NumericVector to cast it to a STL vector of doubles?</div>
<div><br></div><div>I really appreciate the vast work you've put into this package. It's saved my butt a few times!</div><div><br></div><div>Thanks,</div><div>Matt</div></span>