12

I know making .Rmd produce .html file or .md file should use the following codes

---
title: "report"
output: html_document
---

or

---
title: "report"
output: md_document
---

But how to produce the two at the same time? I try the following, but it is not working

---
title: "report"
output: html_document, md_document
---

Another issue is that, how can I make the name of the .html file (or .md file) produced different from the .Rmd file? For example, I have sample.Rmd, but I want the .md file to be named as sample_1.md.

andschar
  • 2,731
  • 1
  • 23
  • 32
Ding Li
  • 613
  • 1
  • 7
  • 15

1 Answers1

17

You can use keep_md: yes to keep the md file while still getting other output. So the YAML will be something like

---
title: "report"
author: "me"
date: '2016-04-25'
output:
  html_document:
    keep_md: yes
---
Richard Telford
  • 8,978
  • 6
  • 36
  • 50