I just found these two gems about debugging in R on r-help today (here is the thread):
1) posted by Thomas Lumley:
traceback() gets you a stack trace at the last error
options(warn=2) makes warnings into errors
options(error=recover) starts the post-mortem debugger at any error,
allowing you to inspect the stack interactively.
2) added by William Dunlap:
will start that same debugger at each warning.
I think these are very useful ideas to remember – thanks.
Cheers, and enjoy life.
To leave a comment
for the author, please follow the link and comment on their blog: Rainer's Blog » R
offers daily e-mail updates
news and tutorials
on topics such as: Data science
, Big Data, R jobs
, visualization (ggplot2
), programming (RStudio
, Web Scraping
) statistics (regression
, time series
) and more...
If you got this far, why not subscribe for updates
from the site? Choose your flavor: e-mail
, or facebook