[R] determining a parent function name

Vladimir Eremeev wl2776 at gmail.com
Thu May 31 14:10:13 CEST 2007




Vladimir Eremeev wrote:
> 
> Does
>   tail(capture.output(traceback()),n=1)
> do what you want?
> 
> that is 
> 

Hmmm... Seems, no...

Having the earlier error() definition and

bar<-function() error("asdasdf")
ft<-function() bar()



> ft()

I get in the tcl/tk window:

Error in bar(): asdasdf

> bar()

I get in the tcl/tk window:

Error in ft(): asdasdf

> I get in the tcl/tk window:

Error in bar(): asdasdf

Some kind of the stack flushing is needed.
.Traceback<-NULL did not help
-- 
View this message in context: http://www.nabble.com/determining-a-parent-function-name-tf3843262.html#a10892608
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list