RStudio will reorder the output list in the YAML depending on which option was selected last in the knit dropdown button.
---
title: "Untitled"
output:
html_document: default
word_document: default
---
The YAML header above gives the option to compile the RMarkdown to word or html. It will give you the main option at the top, in this case html_document
.
When the dropdown is used to select an alternate output, e.g. word_document
, the order of output will change like so:
---
title: "Untitled"
output:
word_document: default
html_document: default
---
I'm assuming (from the helpful remarks by Jonathan and Kevin on a previous question), that this is due to the way RStudio reads the RMarkdown and gives contextual buttons, however, I'm curious if this re-ordering can be 'turned off' somehow?
A motivation for this is version control. This changes the text document, which registers as a modification and therefore forces a commit, or revert.