[R] .Traceback

Wolski wolski at molgen.mpg.de
Mon Jun 14 16:59:11 CEST 2004


Thanks a lot!

of course the assignment

myvar<-.Traceback

is all what I need. 

Eryk



*********** REPLY SEPARATOR  ***********

On 14.06.2004 at 10:53 Duncan Murdoch wrote:

>On Mon, 14 Jun 2004 16:38:48 +0200, "Wolski" <wolski at molgen.mpg.de>
>wrote :
>
>>Hi!
>>
>>Is there a way to write the information stored in the .Traceback variable
>to a file?
>>
>>When I try it with dump()
>>".Traceback" <-
>>list("dump(.Traceback, file = \"Mytraceback.R\")") 
>>
>>Or there are other ways to write this information on the disk if an error
>occurs?
>
>dump() is usually used when you want to recreate the object.  Here,
>you probably just want to print it, so something like
>
>sink('error.txt')
>traceback()
>sink()
>
>might do a better job.  But if you really want the .Traceback list, I
>think you just need to assign it to a new variable before dumping,
>e.g.
>
>saveTrace <- .Traceback
>dump('saveTrace', 'whereever.R')
>
>I imagine the problem you're having is from some special case code to
>handle the .Traceback variable in a dump, but I haven't checked the
>source to see.
>
>Duncan Murdoch
>
>______________________________________________
>R-help at stat.math.ethz.ch mailing list
>https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html




More information about the R-help mailing list