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) ```
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.
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.
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.
I had the same problem which went away after upgrading to RStudio version 0.98.1056 (released 9 September 2014).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With