New R-Studio version 0.98.932 deletes .md file - h

2019-01-14 22:55发布

问题:

after upgrading to v0.98.932, when knitting .Rmd files it produces .md, then .html, but then deletes .md. and I need to keep it to upload to GitHub. Where would the options be to keep the .md files when knitting hmtl from .Rmd?

回答1:

The question is answered here. Three ways to do this:

  1. use the argument keep_md = TRUE in html_document()

  2. call rmarkdown::render() with clean = FALSE

  3. Use md_document as one of your output formats



回答2:

Or you can just indicate in the settings "Keep markdown source file".

This can be done by clicking on the Settings icon that is positioned next to "Knitr HTML". Then you go to Advanced - by default "Keep markdown source file" is unchecked. Just place a checkmark and you are all done!