I am getting below Parsing error each time I use Knit Html in R for converting my Rmd files into HTML:
Error in parse_all(input, filename, stop_on_error != 2L) : unused argument (stop_on_error != 2) Calls: ... call_block -> block_exec -> in_dir -> evaluate -> parse_all
Execution halted
Same result is obtained when using knitr or knitr:knit2html from the command line. Error did not exist before (I have already used Knit HTML for many .Rmd reports) but appeared when I used knit2html from the cmd for the first time. The compilation is only working where there are no R code chunks in the .Rmd file or when the chunks are empty. I work under windows 7, R version: 3.2.3, R studio version: 0.99.902. Below is the only R code chunk in the test.Rmd file that I am using for testing:
```{r}
i <- 0
i < i + 3
i
```
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.
If you use the RStudio IDE, the keyboard shortcut to render R scripts is the same as when you knit Rmd documents ( Ctrl / Cmd + Shift + K ). When rendering an R script to a report, the function knitr::spin() is called to convert the R script to an Rmd file first.
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.
After seeing the same error, the following (updating evaluate package) helped me
install.packages("evaluate")
Evaluate is used by knitr. Here is a link to CRAN about evaluate: https://cran.rstudio.com/web/packages/evaluate/index.html
My R version is 3.2.4. There is no need to do any complicated re-installs. Try this first.
Yes, Vincent is right. You seem to have updated your knitr
package to version 1.13 in the last days. This version only runs under the new R
version 3.3.0 (also released a couple days ago).
You have two options:
R
to version 3.3.0Revert your knitr
installation to version 1.12 using the following code:
packageurl <- "http://cran.r-project.org/src/contrib/Archive/knitr/knitr_1.12.tar.gz"
install.packages(packageurl, repos=NULL, type="source")
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