[R] How to get name of current function?

Johannes Graumann johannes_graumann at web.de
Tue Jan 20 09:47:53 CET 2009


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,

Joh




More information about the R-help mailing list