Re: [Rd] substitute() on arguments in ellipsis ("dot dot dot")?

2018-08-12 Thread Peter Meilstrup
Interestingly, as.list(substitute(...())) also works. On Sun, Aug 12, 2018 at 1:16 PM, Duncan Murdoch wrote: > On 12/08/2018 4:00 PM, Henrik Bengtsson wrote: >> >> Hi. For any number of *known* arguments, we can do: >> >> one <- function(a) list(a = substitute(a)) >> two <- function(a, b) li

[Rd] Package compiler - efficiency problem

2018-08-12 Thread Karol Podemski
Dear R team, I am a co-author and maintainer of one of R packages distributed by R-forge (gEcon). One of gEcon package users found a strange behaviour of package (R froze for couple of minutes) and reported it to me. I traced the strange behaviour to compiler package. I attach short demonstration

Re: [Rd] substitute() on arguments in ellipsis ("dot dot dot")?

2018-08-12 Thread Jeroen Ooms
On Sun, Aug 12, 2018 at 10:00 PM, Henrik Bengtsson wrote: > Hi. For any number of *known* arguments, we can do: > > one <- function(a) list(a = substitute(a)) > two <- function(a, b) list(a = substitute(a), b = substitute(b)) > > and so on. But how do I achieve the same when I have: > > dots <- fu

Re: [Rd] substitute() on arguments in ellipsis ("dot dot dot")?

2018-08-12 Thread Duncan Murdoch
On 12/08/2018 4:00 PM, Henrik Bengtsson wrote: Hi. For any number of *known* arguments, we can do: one <- function(a) list(a = substitute(a)) two <- function(a, b) list(a = substitute(a), b = substitute(b)) and so on. But how do I achieve the same when I have: dots <- function(...) list(???)

[Rd] substitute() on arguments in ellipsis ("dot dot dot")?

2018-08-12 Thread Henrik Bengtsson
Hi. For any number of *known* arguments, we can do: one <- function(a) list(a = substitute(a)) two <- function(a, b) list(a = substitute(a), b = substitute(b)) and so on. But how do I achieve the same when I have: dots <- function(...) list(???) I want to implement this such that I can do: > e