[Rd] internal manipulation of ...

Romain François romain at r-enthusiasts.com
Sat Dec 14 15:12:18 CET 2013


Thanks. This works for me. See this gist: https://gist.github.com/romainfrancois/7959531

Romain

Le 13 déc. 2013 à 01:09, Hadley Wickham <h.wickham at gmail.com> a écrit :

> Could you pass the environment and then look for the object called ... in it?
> 
> f <- function(...) {
>  .Call("my_fun", environment())
> }
> 
> I think (and may well be wrong) that you can use standard tools to
> find the DOTSXP object in that environment.
> 
> Hadley
> 
> 
> On Thu, Dec 12, 2013 at 2:32 PM, Romain François
> <romain at r-enthusiasts.com> wrote:
>> Hello,
>> 
>> I’m looking for examples on how to manipulate the ... internally, e.g. in a .Call or .External function.
>> 
>> I’m particularly interested in accessing the environment in which each contribution to ... can be evaluated.
>> 
>> So far, I’m using tricks involving passing down the sys.calls() and sys.frames() down to the C function. The documentation in http://cran.r-project.org/doc/manuals/R-ints.html#Dot_002ddot_002ddot-arguments did not help me a lot.
>> 
>> Romain
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
> 
> 
> 
> -- 
> http://had.co.nz/



More information about the R-devel mailing list