Skip to content

Quoted R system.file() in YAML header fails #1387

@bwiernik

Description

@bwiernik

If I use system.file() to refer to a file in the YAML header, rendering (with RStudio) fails:

---
title: "Header Test - !expr"
output:
  word_document:
    reference_docx: '`r system.file("templates", "reference_docx_landscape.docx", package = "psychmeta")`'
---

However, if I enter it as an R expression, it works (but evaluating expressions will apparently be disabled by default in the near future):

---
title: "Header Test - !expr"
output:
  word_document:
    reference_docx: !expr system.file("templates", "reference_docx_landscape.docx", package = "psychmeta")
---

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions