When I run render("test.Rmd")
with these YAML parameters, the output is still test.docx
and not teeeeeeeest.docx
:
---
title: "mytitle"
author: "Me, myself and I"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output: word_document
output_file: "teeeeeeeest.docx"
---
However, if I set the argument inside the render function (rmarkdown::render("test.Rmd", output_file = "teeeeeeeest.docx")
), it works fine.
Is it possible to set the output_file
argument inside the YAML header? Else, my purpose is to include the current date in the output file name when knitting with RStudio, how could I do that?