[R] how to extract options for a function call

From: fisken <torpedofisken_at_gmail.com>
Date: Mon, 18 Apr 2011 15:56:56 +0200

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.

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", "CG", "L-BFGS-B", "SANN")

Or for instance the 'method' in the dist function can be supplied with euclidian,maximum,manhatten, canberra,binary,minkowski.

Is there someway to extract this so I would have a vector with c("euclidian","maximum","manhatten", "canberra","binary","minkowski").


R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 18 Apr 2011 - 14:10:24 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 18 Apr 2011 - 15:30:30 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive