[R] argument names inside a function?

Duncan Murdoch murdoch.duncan at gmail.com
Sat Mar 24 22:25:16 CET 2012


On 12-03-24 5:04 PM, Ed Siefker wrote:
> Is there a way I can get the names of the arguments passed to a
> function from within a function?

Use sys.call() to get the call, names(sys.call()) to get the names.  It 
won't tell you how arguments were matched to formal names; for that you 
could use names(match.call()).

Duncan Murdoch



More information about the R-help mailing list