Debugging
Theory
Functions
Examples
traceback
> mean(x)
Error in mean(x) : object 'x' not found
> traceback()
1: mean(x)debug
recover
Last updated
> mean(x)
Error in mean(x) : object 'x' not found
> traceback()
1: mean(x)Last updated
> debug(lm)
> lm (y- x)
debugging in: lm(y - x)> options(error=recover)
> read.csv("donotexitfile")
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
cannot open file 'donotexitfile': No such file or directory
Enter a frame number, or 0 to exit
1: read.csv("donotexitfile")
2: read.table(file = file, header = header, sep = sep, quote = quote, dec = dec, fill = fill, comment.char = comment.char, ...)
3: file(file, "rt")