简体   繁体   English

R markdown错误:无法生成HTML文件

[英]R markdown error: can't produce HTML file

I can't produce an HTML document from any .Rmd file by pressing the Knit HTML button in R Studio, including the sample document that summarizes and plots the cars dataset. 我无法通过按R Studio中的Knit HTML按钮从任何.Rmd文件生成HTML文档,包括汇总和绘制汽车数据集的示例文档。 Here's the error message that I get: 这是我得到的错误消息:

Error: unrecognized fields specified in html_dependency: attachment
Execution halted

However, I can produce the HTML document by running the command knit2html("file.Rmd") . 但是,我可以通过运行命令knit2html("file.Rmd")来生成HTML文档。 The Knit PDF button also functions properly. Knit PDF按钮也可正常运行。 Does anyone have an idea about how to fix this error? 有没有人知道如何解决这个错误?

Here's the sample .Rmd file that I have: 这是我的示例.Rmd文件:

title: "Untitled"
author: "blakeoft"
date: "Friday, September 12, 2014"
output: html_document
---

A summary:

```{r}
summary(cars)
```

升级到RStudio版本0.98.1056(2014年9月9日发布)后,我遇到了同样的问题。

As I've answered on another thread , updating RStudio didn't work for me. 正如我在另一个帖子中回答的那样,更新RStudio并不适合我。 So I tried updating all R packages ( Tools > Check for Package Updates... ) and then it worked. 所以我尝试更新所有R软件包( Tools > Check for Package Updates... ),然后就可以了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM