Does Quarto support R expressions within the YAML header?
I have a quarto QMD file that has the following yaml:
---
format:
docx:
reference-doc: !expr system.file('reference.docx', package = 'custom_package')
---
This throws a YAML parsing error : Error in $: parsing Text failed, expected String, but encountered Object
which suggests that the expression isn't being evaluated and substitute with a string.
I've tried other methods such as the ones discussed here but haven't had any success getting this to work properly. IIRC you could get expressions like this to work in RMarkdown but that may not be the case in Quarto.