0

I am trying to automate some reports which should have different names and dates. So I was wondering whether it is possible when rendering the document to change these on the fly? Or whether it is just easier to specify them as headers within the document and remove the title/date options?

In other words, can I change the YAML automatically? Maybe output_options does this?

NOTE: I am trying to create Word documents.

nathaneastwood
  • 3,664
  • 24
  • 41
  • 2
    You can use R (inline) chunks even in the YAML header. – daroczig Jul 03 '15 at 11:06
  • Yes, thanks. It seems you are correct and a little further research led me to this: http://stackoverflow.com/questions/23449319/yaml-current-date-in-rmarkdown Thanks for your help. – nathaneastwood Jul 03 '15 at 11:58

1 Answers1

0

You can using inline R code in the YAML header. See this thread here: YAML current date in rmarkdown

Community
  • 1
  • 1
nathaneastwood
  • 3,664
  • 24
  • 41