If I knit an R Markdown file to html_document
, an .html
document is created in the same directory, as expected. However, if I then change the output and knit to github_document
, the previously created .html
file is removed and a new .md
file is created. Why does github_document
remove previously created files and how can I change this?
Note that if I change back to html_document
, the existing .md
file will not be removed, so this is working as expected, it is only github_document
that removes previous files.
A somewhat related issue was posted previously here RMarkown PDF Document - Removes other files??