When running Sweave from emacs-ess, errors are provided with a code chunk number. Is there an easy way to navigate among the code chunks by number? Otherwise, they are difficult to identify.
How do I identify which Sweave code chunk gives an error?
620 Views Asked by David LeBauer At
3
There are 3 best solutions below
1

Another thing that might help is setting options(error=recover)
in your R environment before sweaving. That will give you a chance to investigate the state of things just before an error is thrown.
0

In noweb mode in emacs M-n i inserts the chunk and asks for the label. You can navigate between them with M-n g which is very handy with completion packages like ido
or icicles
. With ido you must use this hack to activate it for all completion-read based functions such as noweb-goto-chunk
from above.
I don't use emacs-ess (I use Eclipse/ StatEt) but this shows which code chunks are being processed by label (each code chunk starts with
<<label="Some Text"...
Does your code chunks include labels ?