RoyalTS
RoyalTS

Reputation: 10203

Default _output.yml

I can set the output format for all RMarkdown files in a directory by putting a _output.yml file in that directory. Is there a way of making such a file apply more broadly, e.g. to all RMarkdown files within a git repository? An R project?

Upvotes: 1

Views: 110

Answers (1)

RoyalTS
RoyalTS

Reputation: 10203

This doesn't quite solve the original problem but you can specify the YAML file that is to be used explicitly, so one could e.g. put a _output.yml at ~ and then have Rmd files contain the following header section:

---
output_yaml:
  - ~/_output.yml
  - _output.yml
---

which will use the "global" file if that exists and whatever is contained in the same folder as the Rmd file if that exists.

Upvotes: 2

Related Questions