Hi,

Rcpp::IntegerVector can not be converted to std::vector<unsigned>. Is
there a class that can help convert SEXP to std::vector<unsigned>?

The current walkaround can be something like the following. I'm
wondering if there is a better solution?

Rcpp::IntegerVector vec(vx);

std::vector<unsigned> v;
for (int i=0; i<vec.size(); i++) {
v.push_back(vec[i]);
}

-- 
Regards,
Peng
_______________________________________________
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

Reply via email to