Skip to content
Prev 165449 / 398506 Next

.C and 'temporaries'

On 23/12/2008 6:55 PM, Thomas Mang wrote:
Yes.  It makes a copy of the object computed as Obj2 + 100, and passes 
that to Func.
I suspect it is, but I would never use DUP = FALSE.  What the docs say 
is that this will let you modify the temporary object Obj2 + 100, and 
then the results will be returned in the return value of .C.  So it 
should be safe, but it is probably not tested very frequently.  If you 
are worried about the overhead of duplicating the vector, it's probably 
time to learn the .Call interface instead.

Duncan Murdoch