The inline expression above calls R to get the current time ( Sys.time())when the document is “knitted”, and then format the date ( format(Sys.time(), '%d %B, %Y')) to human readable format.Ī full table of POSIXct formats (i.e. Therefore, it is possible to write r expressions inside the YAML header. Knitr evaluates the r expressions (both inline and block) to create a markdown before passing it to pandoc to convert the markdown to HTML report. date : '`r format(Sys.time(), '%d %B, %Y')`' - Explanation This one-liner from Stack Overflow does the trick. To differentiate between them, it is needed to show the last updated date on the top of the document. The rmarkdown document is continuously updating that there will exist various verison of the report. Though, I may not have time to write many paragraphs. This list may be continuously updating, as I always learn new things about R. Here is a list of selected packages and functions I find extremely useful (for my routine works, at least). The details and flexibility of extending your Rmd is fully listed in the R Markdown Cookbook. I am always surprised many functions that I believe required manual edits the actually available as functions in knitr.
Rmarkdown (and markdown) are crazily useful to generate documents.