[R] Obtaining argument name within a function

Francisco J. Zagmutt gerifalte28 at hotmail.com
Tue Jul 19 04:16:53 CEST 2005


Dear all

How can I obtain the name of the argument passed in a function?  Here is a 
simplistic example of what I would like to obtain:

myfunction= function(name) {
     print(paste("The parameter name was",unknownFunction(name))
     }

myfunction(myobject)
[1] "The parameter name was myobject"

Thanks

Francisco




More information about the R-help mailing list