Re: [Rcpp-devel] ambiguous overload for ‘operator[ ]’

2010-10-28 Thread Davor Cubranic
You're mixing NumericVectors, std::vectors, and XPtrs, not to mention using plain C's memcpy to copy C++ objects. Even if it compiled, I'd be surprised if this code worked correctly. If you want to copy pdA into v, you should probably use std::copy with iterators (with v as the target, not pdB

[Rcpp-devel] ambiguous overload for ‘operator[ ]’

2010-10-27 Thread Kaveh Vakili
trying to feed the beast something line by line (if this works to the end it may become an instance of quickselect() :) int k = Rcpp::as(kr); NumericVector pdA(pdAr); int n = pdA.size(); //this: //double *pdB = new double [n] ; //becomes