Displaying 1 result from an estimated 1 matches for "my_function_name".
Did you mean:
m_function_name
2006 Nov 09
2
Retrieving function name
...now how I can retrieve a function name, for example
If I have a function f as follows:
f <- function( myfunc ) {
print( name_of(myfunc) );
}
I want to know what I should have as "name_of" such that I could call this
with :
f( median )
and it would print "median"
or f( my_function_name ) and it would print "m_function_name".
So far all I can get is the function definition that myfunc points to.
I thought the structure command might do it but this also just gives back
the function definition and not the original name.
Any suggestions?
Tom
--
Dr. Thomas McCallum
S...