[R] determining a parent function name
Sundar Dorai-Raj
sundar.dorai-raj at pdf.com
Thu May 31 15:17:28 CEST 2007
Hi, Vladimir,
Sorry, didn't see this reply. .Traceback <- NULL doesn't work because of
the warning in ?traceback.
Warning:
It is undocumented where '.Traceback' is stored nor that it is
visible, and this is subject to change. Prior to R 2.4.0 it was
stored in the workspace, but no longer.
Thanks,
--sundar
Vladimir Eremeev said the following on 5/31/2007 5:10 AM:
>
>
> 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
More information about the R-help
mailing list