Re: [Rd] Use of Rf_duplicate

2007-05-29 Thread Oleg Sklyar
> PROTECT(y=x); and This has no sense as y is just the same pointer as x. By doing this you did not create any new data, if you modify y, x will be modified. y does not need protection as x is probably protected. > PROTECT (y = duplicate(x)); ? This will allocate new memory for data in x and c

[Rd] Use of Rf_duplicate

2007-05-29 Thread Michael Braun
First, thanks to those of you who responded to my previous post about my code that was taking longer and longer to process. After following your suggestions, and I now thinking that the problem was some calls to Rf_duplicate in my C code. So I'm hoping I could get some clarification on what Rf_du