On Wed, Aug 31, 2011 at 3:00 AM, <rcpp-devel-requ...@r-forge.wu-wien.ac.at> wrote: > > Rcpp::NumericVector x = as<Rcpp::NumericVector>(x_); > std::vector<double> x = as< std::vector<double> >(x_);
Nice clarification of what's going on under the hood, Darren. For the first case, the above is synonymous with: Rcpp::NumericVector x(x_); If you want a deep copy, you can use: Rcpp::NumericVector x(clone(x_)); See the quickref pdf for examples (http://cran.r-project.org/web/packages/Rcpp/vignettes/Rcpp-quickref.pdf).... there, "using namespace Rcpp;" is implied throughout unless otherwise noted. -xian -- A man, a plan, a cat, a ham, a yak, a yam, a hat, a canal – Panama! _______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel