R MARKDOWN:代码块运行,但编织时会出现错误
我正在使用rstudio云。我正在运行一个rmarkdown文档,当我在文档中运行代码块时,它们正常工作,但是当我试图编织时,我会遇到错误。在我使用代码“ knitr :: opts_chunk $ set(error = true)”之前,文档根本不会编织(错误消息说找不到对象);现在它编织了,但我会收到错误消息“ .external2中的##错误(c_dataviewer,x,title):无法启动数据查看器“当我尝试查看我创建的(我创建的数据帧我显示的数据框架)时在全球环境中,但不在我的文件路径目录中,即 /云 /项目)。我猜那个rmarkdown找不到它们,因为它们处于不同的文件路径中?我还假设全球目录中的文件无法用于编织,那么我该如何使它们可以用于编织呢?谢谢你!
I'm using RStudio Cloud. I'm running an RMarkdown doc, when I run the code chunks in the doc they work fine, but when I'm trying to knit I get errors. Before I used the code "knitr::opts_chunk$set(error = TRUE)" the doc wouldn't knit at all (error message was saying objects couldn't be found); now it knits BUT I get the error message "## Error in .External2(C_dataviewer, x, title): unable to start data viewer" when I try to View(dataframes) that I've created (the data frames I created show up in the global environment but not in my file path directory, which is /cloud/project). I'm guessing that RMarkdown can't find these since they are in a different file path? I'm also assuming that files in the global directory aren't available for RMarkdown to knit, so how do I get them to be available for RMarkdown to knit? Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以做到这一点,而不是这样做。
这将在编织文档中打印您的整个数据框
df
。Instead of doing View you can just do this.
this will print your whole dataframe
df
in the knitted document.