Re: [Rd] question about an R idiom: eval()ing a quoted block

2023-07-20 Thread peter dalgaard
In the case of power.t.test, there is a situation where you want to create 4 different functions with the same function body, in order to pass them to uniroot(). I think that at the time, it just seemed convenient to express that idea with a quote-eval (macro-like) construction, rather than figu

Re: [Rd] question about an R idiom: eval()ing a quoted block

2023-07-11 Thread Duncan Murdoch
On 11/07/2023 6:01 p.m., Ben Bolker wrote: In a few places in the R source code, such as the $initialize element of `family` objects, and in the body of power.t.test() (possibly other power.* functions), sets of instructions that will need to be run later are encapsulated by saving them as an

[Rd] question about an R idiom: eval()ing a quoted block

2023-07-11 Thread Ben Bolker
In a few places in the R source code, such as the $initialize element of `family` objects, and in the body of power.t.test() (possibly other power.* functions), sets of instructions that will need to be run later are encapsulated by saving them as an expression and later applying eval(), rath