I'm trying to render a pdf using Rmarkdown and knitr. This process changes the following line of my script:
"`r format(Sys.time(), '%B %d, %Y')`"
to:
'`r format(Sys.time(), ''%B %d, %Y'')`'
Specifically, these double single quotes around ''%B %d, %Y''
are throwing up the message:
Error in yaml::yaml.load(enc2utf8(string), ...) :
Scanner error: while scanning for the next token at line 5, column 31found character that cannot start any token at line 5, column 31
Why is knitr making these adjustments automatically, and can it be fixed / turned off?
Thanks in advance for any advice.
I have checked the answers here YAML current date in rmarkdown but did not solve my problem unfortunately