Re: [Rd] messing with ...

2008-08-13 Thread Ben Bolker
Tony Plate wrote: here's my two cents: - require names on parameters, rather than order - construct calls and use eval() rather than do.call() (then you can manipulate list(...) without the ugh factor of do.call() -- though is do.call() any different to eval() in R? -- I know in S-PLUS that the

Re: [Rd] messing with ...

2008-08-13 Thread Prof Brian Ripley
On Wed, 13 Aug 2008, Tony Plate wrote: Ben Bolker wrote: I'm looking for advice on manipulating parameters that are going to be passed through to another function. Specifically, I am working on my version of "mle", which is a wrapper for optim (among other optimizers). I would prefer not

Re: [Rd] messing with ...

2008-08-13 Thread Tony Plate
Ben Bolker wrote: I'm looking for advice on manipulating parameters that are going to be passed through to another function. Specifically, I am working on my version of "mle", which is a wrapper for optim (among other optimizers). I would prefer not to replicate the entire argument list of

Re: [Rd] messing with ...

2008-08-13 Thread Christos Hatzis
If I understand it correctly, one way would be to define a function to specify the default options/arguments in the required order. For example, > mle.options <- function(method = "BFGS", lower = 0, upper = Inf, hessian=FALSE) + list(method=method, lower=lower, upper=upper, hessian=hessian) > mle