[R] .Traceback

Peter Dalgaard p.dalgaard at biostat.ku.dk
Mon Jun 14 16:45:03 CEST 2004


"Wolski" <wolski at molgen.mpg.de> writes:

> 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?

You can assign it to a variable of a different name and save that. I
suspect that is the only way. E.g.,

  f <- function() foo()
  lm(y~x,data=f()) # lazy evaluation makes this interesting 
  x <- .Traceback
  dput(x) # or dump("x"), or save(), or....

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907




More information about the R-help mailing list