[R] .C and DUP=TRUE versus .Call

Jonathan Rougier J.C.Rougier at durham.ac.uk
Thu Sep 7 14:29:21 CEST 2000

Hi Everyone,

I have a piece of C code that uses R_alloc, and so I set DUP=TRUE in the
call using ".C".  As I understand it this takes a copy of each object
passed to my function.  If these objects are large then this could be
expensive.  My question is, if I rewrote the code to use .Call, would I
avoid this duplication by using the objects themselves (they are not
modified in the code) rather than copies?

Many thanks, Jonathan.

Jonathan Rougier                       Science Laboratories
Department of Mathematical Sciences    South Road
University of Durham                   Durham DH1 3LE

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list