【发布时间】:2017-06-15 19:09:05
【问题描述】:
我无法让 R 从笔记本中输出任何工作。我已经更新了所有软件包并重新安装了 R。我尝试预览并且收到的错误消息是“找不到 html_dependency 的路径”。我相信这个问题可能与我的文件未能使用 .Rmd 文件创建 .nb.html 文件有关,但我不确定。 我用来确保它不是用户错误的方法是打开一个全新的会话和笔记本并尝试输出已经编写的脚本。 有什么想法吗?
编辑: 这是我的代码,它是基本笔记本代码: --- 标题:“R 笔记本” 输出:html_notebook ---
This is an [R Markdown](http://rmarkdown.rstudio.com) Notebook. When you
execute code within the notebook, the results appear beneath the code.
Try executing this chunk by clicking the *Run* button within the chunk or by
placing your cursor inside it and pressing *Ctrl+Shift+Enter*.
```{r}
plot(cars)
```
Add a new chunk by clicking the *Insert Chunk* button on the toolbar or by
pressing *Ctrl+Alt+I*.
When you save the notebook, an HTML file containing the code and output will
be saved alongside it (click the *Preview* button or press *Ctrl+Shift+K* to
preview the HTML file).
我已将其保存为测试notebok.Rmd,但无法获取 .nb.html 文件来创建自己,我认为这是问题所在。
【问题讨论】:
-
最好的办法是在此处添加尽可能多的文件。这样,诊断会更容易。
标签: r r-markdown rnotebook