Re: [R] how to extract options for a function call

2011-04-18 Thread fisken
thanks 2011/4/18 S Ellison : > > fisken 18/04/2011 14:56:56 >>> >>But what I want, >>is to extract the options associated with a parameter for a function. > > Try > ?formals > > S Ellison > > *** > This email and any attachments

Re: [R] how to extract options for a function call

2011-04-18 Thread Henrique Dallazuanna
Try this: For optim: eval(formals(optim)$method) For dist function: eval(body(dist)[[3]][[3]]) On Mon, Apr 18, 2011 at 10:56 AM, fisken wrote: > Hi, I'm having some difficulties formulating this question. > > But what I want, > is to extract the options associated with a parameter for a functi

Re: [R] how to extract options for a function call

2011-04-18 Thread S Ellison
>>> fisken 18/04/2011 14:56:56 >>> >But what I want, >is to extract the options associated with a parameter for a function. Try ?formals S Ellison *** This email and any attachments are confidential. Any use...{{dropped:8}} ___

[R] how to extract options for a function call

2011-04-18 Thread fisken
Hi, I'm having some difficulties formulating this question. But what I want, is to extract the options associated with a parameter for a function. e.g. method = c("Nelder-Mead", "BFGS", "CG", "L-BFGS-B", "SANN") in the optim function. So I would like to have a vector with c("Nelder-Mead", "BFGS"