R Markdown cannot Knit HTML; YAML Error

Last week I was not able to knit my homework, and spent a long time researching the issue and never was able to figure it out. I thought maybe I had input or typed something invalid in the markdown file, but I realized that I get an error trying to knit even the default markdown (same error I got every time last week). I have attached a screenshot of this instance.

I have since reinstalled RStudio, reinstalled both the rmarkdown and knitr packages, removed and reinstalled YAML, and I still cannot knit the default R markdown document.

It is the same error each time:
Error in yaml::yaml.load(..., eval.expr = TRUE) :
unused argument (eval.expr = TRUE)
Calls: ... parse_yaml_front_matter -> yaml_load ->
Execution halted

Any help would be greatly appreciated.

I believe a similar issue came up here recently and the solution (thanks to @andresrcs) was to simply remove the yaml package and then install it again.

See here.

This is an issue with version of yaml and version of knitr. You need 2 version compatible with each other. Either upgrade everything or choose your version.

See this answer for details

Thank you both for the help, using your tips I was able to do some more research and figure it out. I did not have the latest version of R installed, so after I reinstalled both R and RStudio with the latest versions, everything is working smoothly now.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.