Java Mailing List Archive

http://www.r-help.com/

Home » Home (12/2007) » R Help for Statistical Computing »

[R] Obtaining argument name within a function

F Z

2005-07-18

Replies:

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@(protected)
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
©2008 r-help.com - Jax Systems, LLC, U.S.A.