Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
295 views
in Technique[技术] by (71.8m points)

knitr: getting a parse_all error in R when converting Rmd file into HTML

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
```
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...