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
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.
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.
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.