28
votes

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. 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"). The Knit PDF button also functions properly. Does anyone have an idea about how to fix this error?

Here's the sample .Rmd file that I have:

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

A summary:

```{r}
summary(cars)
```
2
Can you provide a minimal example of the Rmd that produce this? I assume this is because RStudio uses rmarkdown while knitr uses markdown for rendering HTML. - Thomas
updating rstudio could have fixed this indirectly, but updating rmarkdown would have worked - rawr
updating rmarkdown to 0.4.2 solved this issue for me as well - DonDyck

2 Answers

36
votes

I had the same problem which went away after upgrading to RStudio version 0.98.1056 (released 9 September 2014).

4
votes

As I've answered on another thread, updating RStudio didn't work for me. So I tried updating all R packages (Tools > Check for Package Updates...) and then it worked.