[R] {lattice/grid} "Error using packet 1" and traceback

Deepayan Sarkar deepayan.sarkar at gmail.com
Thu Feb 14 17:54:34 CET 2008


On 2/14/08, Felix Andrews <felix at nfrac.org> wrote:
> You can tell Lattice to stop when an error occurs, like this:
>
>  lattice.options(panel.error="stop")
>  xyplot(1:10 ~ 1:10, panel=function(...) stop("foo"))
>  # -> Error in panel(x = 1:10, y = 1:10) : foo
>
>  That is a little more informative than the default "panel.error",
>  because it tells you the conditionCall as well as the
>  conditionMessage.
>
>  But unfortunately, traceback() will still not work as you expect, it
>  will say something unhelpful about tryCatch() inside print.trellis().
>  As far as I know there is no way to recover the call stack from an
>  error once it has been caught by tryCatch. (I would be very happy to
>  be proved wrong...)

Right, and I've also thought that this was a bad thing. I'll see if I
can figure out a way to restore traceback functionality. If all else
fails, I'll just another option that disables the tryCatch mechanism.

-Deepayan



More information about the R-help mailing list