Re: [R] How to get name of current function?

2009-01-20 Thread Johannes Graumann
Thanks a lot. Exactly what I was looking for. Joh Prof Brian Ripley wrote: > On Tue, 20 Jan 2009, Johannes Graumann wrote: > >> Hello, >> >> Is there a way to get the name of the function currently running? > > It may not even have a name (you can write functions anonymously as > 'function(x)

Re: [R] How to get name of current function?

2009-01-20 Thread Prof Brian Ripley
On Tue, 20 Jan 2009, Johannes Graumann wrote: Hello, Is there a way to get the name of the function currently running? It may not even have a name (you can write functions anonymously as 'function(x) x+1' in function arguments). I think rather the point is that you can get the name (if any

[R] How to get name of current function?

2009-01-20 Thread Johannes Graumann
Hello, Is there a way to get the name of the function currently running? I'd like to have something like this x <- function(){ myName <- getNameOfCurrentFunction cat(myName) } so that x() would result in "x" Thanks for any pointers,