Jan 5 in JSON
Q: How to add current date in rmarkdown in YAML?

1 Answer

0 votes
Jan 5

This is a little bit tricky, but you just need to make the date field valid in YAML by quoting the inline R expression, e.g.

date: "`r format(Sys.time(), '%d %B, %Y')`"

Then the parsing error will be gone, and the date will be generated in the markdown output so Pandoc can use the value from Sys.time().

Related questions

0 votes
Jan 5 in JSON
0 votes
Jan 14 in JSON
...