Re: [Rcpp-devel] Trailing Index issues, handled as pointer

2014-07-07 Thread Mario Deng
Thanks alot, solved my problem within seconds. But why is the result from match() 1-indexed? I thought it would be a native cpp function and expected a 0-based index. __ MD [email protected] On 07.07.2014, at 16:59, John Laing wrote: > Mario, > > Your vector matched is 1-indexed, bu

Re: [Rcpp-devel] Trailing Index issues, handled as pointer

2014-07-07 Thread John Laing
Mario, Your vector matched is 1-indexed, but by passing an element of this vector (match_id) to rownames[] you're treating it as if it's 0-indexed. -John On Mon, Jul 7, 2014 at 10:33 AM, Mario Deng wrote: > Hello everyone, > > I am trying to implement a data structure using Rcpp. But I am