These single and double quotes, as a rule, are equivalent in R (as, for example, in Python), they do not matter, the problem of parsing arises at the YAML level.
You do not need to specify scalars in YAML, but if you do, you need to know that double style quotes ( " ) require escaping:
This is the only style that can express arbitrary strings using "\" escape sequences. This is due to the fact that you need to avoid the characters "\" and "".
So, if you want to use double quotes in double quotes, you should do:
--- title: "Eye tracking AOI plots" author: "Steven Vannoy" date: "`r format(Sys.time(), \"%I:%M\")`" output: html_document ---
This SabDeM solution also works because there are no quotes in the scalar
`r format(Sys.time(), "%I:%M")`
single style quotes, however, can only represent strings consisting only of printable characters.
Scalars often do not need to be specified in YAML at all, as you already did with the keys ( title , author , etc.). But a simple style scalar cannot start with backquote. I would use the regular style for all scalars, except for the value for the date key, and use the literal style for this (only) to get the IMO more readable:
--- title: Eye tracking AOI plots author: Steven Vannoy date: |- `r format(Sys.time(), "%I:%M")` output: html_document ---
This exactly matches your YAML.