Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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. 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) ``` 
like image 829
blakeoft Avatar asked Sep 11 '14 14:09

blakeoft


People also ask

How do I export R Markdown to HTML?

To transform your markdown file into an HTML, PDF, or Word document, click the “Knit” icon that appears above your file in the scripts editor. A drop down menu will let you select the type of output that you want. When you click the button, rmarkdown will duplicate your text in the new file format.

Why is my R Markdown file not knitting?

No Knit HTML button This means that RStudio doesn't understand your document is supposed to be an RMarkdown document, often because your file extension is . txt . To fix this, go to the Files tab (lower right corner, same pane as Plots and Help) and select the checkbox next to your document's name.

Why will my R not knit?

If a chunk works in R but not when you knit, it is almost always because you've changed a variable in your global working environment not using code in a chunk. Try restarting your R session and running each chunk sequentially to make sure all your variable values are up to date.


1 Answers

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

like image 154
Stephan McMaster Avatar answered Oct 07 '22 23:10

Stephan McMaster