Dear Rcpp Users,<div><br></div><div>I would like to concatenate two NumericVectors. For instance:</div><div><br></div><div>...</div><div>NumericVector a( some_STL_vector ) ;</div><div>NumericVector b( some_STL_vector ) ;</div>
<div><br></div><div>...  // using Rcpp sugar on a and b</div><div><br></div><div>a.insert( a.end(), b.begin(), b.end() );</div><div><br></div><div>... // using Rcpp sugar on a</div><div><br></div><div><br></div><div><br></div>
<div>This would work fine if a and be were of type std::vector<double>. However, NumericVector does not seem to have an insert function which supports the structure above and therefore this isn't working.</div><div>
<br></div><div>Any ideas on how I could concatenate the two vectors using a different methodology? The reason I would like to use NumericVectors here is because I am using Rcpp sugar on a and b and the resulting concatenated vector and I would like to avoid converting them back and forth between std::vector and NumericVector.</div>
<div><br></div><div>Thanks,</div><div><br></div><div>Martin</div>