如何识别哪个 Sweave 代码块出现错误?

发布于 2024-10-09 02:00:43 字数 76 浏览 0 评论 0 原文

从 emacs-ess 运行 Sweave 时,错误会提供代码块编号。有没有一种简单的方法可以按数字在代码块之间导航?否则,很难识别它们。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

跨年 2024-10-16 02:00:43

我不使用 emacs-ess (我使用 Eclipse/ StatEt),但这显示了标签正在处理哪些代码块(每个代码块以 < 您的代码块包含标签吗?

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 ?

莫言歌 2024-10-16 02:00:43

在 emacs 的 noweb 模式下 Mn i 插入块并请求标签。您可以使用 Mn g 在它们之间导航,这对于像 idoicicles 这样的完成包非常方便。使用 ido,您必须使用此 hack 来激活所有基于完成读取的功能,例如上面的 noweb-goto-chunk

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.

凌乱心跳 2024-10-16 02:00:43

另一件可能有帮助的事情是在 sweaving 之前在 R 环境中设置 options(error=recover)。这将使您有机会在抛出错误之前调查事物的状态。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文