title: Use R code or Windows user variable ("%userprofile%") in YAML?
body: <p>In my yaml call I have</p>
  
  <pre><code>---
  title: "`r paste0('Test. Done ', format(Sys.Date(), '%B-%Y'))`"
  output:
    word_document:
      fig_caption: yes
      fig_height: 4
      fig_width: 7
      reference_docx: %userprofile%\Documents\template.docx
  ---
  </code></pre>
  
  <p>But YAML complains about <code>%userprofile%</code>. Is it possible to include such a variable?</p>
  
  <p>I have tried e.g. </p>
  
  <pre><code>reference_docx: "`r file.path(path.expand('~'), 'skabelon.docx')`"
  </code></pre>
  
  <p>But that still results in this YAML error.</p>
  
  <pre><code>pandoc.exe: `r file.path(path.expand('~'), 'skabelon.docx')`: openBinaryFile: does not exist (No such file or directory)
  </code></pre>
  
  <p>I guess this meens that the r expression is not processed before the yaml? I have checked that the file is there... Or is it becayse pandoc is using another 'userprofile' ? how can I check this?</p>
  
  <p>I can however use such a call in the <code>Title</code> variable, as per the updated title above. I guess this must be a specific knitr issue.</p>