[Rd] Garbage collection of seemingly PROTECTed pairlist

2020-09-11 Thread Rory Nolan
I want to write an R function using R's C interface that takes a 2-column matrix of increasing, non-overlapping integer intervals and returns a list with those intervals plus some added intervals, such that there are no gaps. For example, it should take the matrix rbind(c(5L, 6L), c(7L, 10L), c(20L

Re: [Rd] Garbage collection of seemingly PROTECTed pairlist

2020-09-12 Thread Rory Nolan
ote: > > Hi, > > In line 5, you are allocating a vector of length nc. Then, in line 12, you > are using nr as a limit, so if nr goes beyond nc, which is happening in line > 39, you are in trouble. > > IƱaki > > On Sat, 12 Sep 2020 at 03:30, Rory Nolan <mailto:roryn