Re: [Rd] internal manipulation of ...

2013-12-14 Thread Romain François
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.wick...@gmail.com a écrit : Could you pass the environment and then look for the object called ... in it? f - function(...) { .Call(my_fun,

Re: [Rd] internal manipulation of ...

2013-12-14 Thread Peter Meilstrup
In R code, get(..., environment()) will retrieve the DOTSXP object. So another way is to write your wrapper functions like someFunc - function(...) { .External(someFunc_extern, get(..., ifnotfound=NULL) ) } If you're trying to mimic what substitute() et al do, you'll sometimes need to follow a

[Rd] internal manipulation of ...

2013-12-12 Thread Romain François
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

Re: [Rd] internal manipulation of ...

2013-12-12 Thread Simon Urbanek
On Dec 12, 2013, at 3:32 PM, Romain François rom...@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

Re: [Rd] internal manipulation of ...

2013-12-12 Thread Romain François
Le 13 déc. 2013 à 00:15, Simon Urbanek simon.urba...@r-project.org a écrit : On Dec 12, 2013, at 3:32 PM, Romain François rom...@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

Re: [Rd] internal manipulation of ...

2013-12-12 Thread Hadley Wickham
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