[R] Only referenc copy when calling C routine?

Shin, Daehyok sdhyok at email.unc.edu
Mon Apr 12 02:14:00 CEST 2004


What happens when I pass an array to a dynamically linked C routine?
Is only its reference copied when an array is passed and returned?
Or, is its whole content copied?

In R extension manual, I found the following description.
But, I can't know exactly which is true.

"There can be up to 65 further arguments giving R objects to be passed to
compiled code.
Normally these are copied before being passed in, and copied again to an R
list object when
the compiled code returns. If the arguments are given names, these are used
as names for
the components in the returned list object (but not passed to the compiled
code)."

Thanks in advance.

Daehyok Shin




More information about the R-help mailing list