[Rd] Editing the "..." argument

Bengoechea Bartolomé Enrique (SIES 73) enrique.bengoechea at credit-suisse.com
Mon Jul 7 12:39:05 CEST 2008


The 'modifyList' function on package Utils allows to do that in a very compact way:

do.call("optim", modifyList(list(<your default values>), list(...)))

Regards,

Enrique

Mathieu Ribatet wrote:
> Dear all,
> 
> I'd like tweaking the ... arguments that one user can pass in my 
> function for fitting a model. More precisely, my objective function is
> (really) problematic to optimize using the "optim" function. 
> Consequently, I'd like to add in the "control" argument of the latter 
> function a "ndeps = rep(something, #par)" and/or "parscale = something"
> if the user has not specified it already.
> 
> Do you know a way to deal with this point?
> In advance, thanks.
> 
> Mathieu



More information about the R-devel mailing list