[R] Obtaining argument name within a function

From: Francisco J. Zagmutt <gerifalte28_at_hotmail.com>
Date: Tue 19 Jul 2005 - 12:16:53 EST


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



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Jul 19 12:23:32 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:46 EST