[R] from function to its name?

Ido M. Tamir tamir at imp.univie.ac.at
Fri Mar 2 17:06:57 CET 2007


Charilaos Skiadas wrote:

> On Mar 2, 2007, at 9:42 AM, Ido M. Tamir wrote:
>>
>> But how do I get from a function to its name?
> 
> Can you do this with any object in R?
> In what situation will you be wanting this name? I mean, how would
> you be given this object, but not know its name in advance? If it is
> passed as an argument in a function or something, then what would you
> consider to be its name?
> I.e. I don't really see where you would reasonably want to do
> something like this, without there being another way around it.
> 

I wanted to pass a vector of functions as an argument to a function to do some 
calculations and put the results in a list where each list entry has 
the "name" of the function.
I thought I could either pass a vector of function names as character, then
retrieve the functions etc...
Or do the opposite, pass the functions and then retrieve the names, but
this seems not to be possible it occurred to me, hence my question.


thanks
ido



More information about the R-help mailing list