Clemence Aile
Clemence Aile

Reputation: 21

How to fix "yaml.load unused argument" in Rmarkdown

When using R Markdown, R Studio warned me the following message : "Rendering R Markdown documents requires an updated version of the yaml package". So I installed the latest version of the package yaml (2.2.0). But since then, I cannot knit any document in Rmarkdown (even the template or documents that were working just fine before).

I tried downloading older versions of yaml but I get the same message as at the beginning ("requires an updated version").

When I knit a document, I get the following error :

Error in yaml::yaml.load(..., eval.expr = TRUE) : 
  unused argument (eval.expr = TRUE)
Calls: <Anonymous> ... parse_yaml_front_matter -> yaml_load -> <Anonymous>

Upvotes: 2

Views: 2169

Answers (1)

manuelvigarcia
manuelvigarcia

Reputation: 2104

I had the unused argument (eval.expr = TRUE) problem after updating RStudio. Somehow it messed up with the R installation and an .Rmd that worked before, stopped working with that error.

What did the trick for me was removing yaml and installing it again.

> remove.packages("yaml")
> install.packages("yaml")
>

Upvotes: 0

Related Questions