Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to produce both .html and .md in .Rrmd using Rmarkdown and rename them?

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.

like image 382
Ding Li Avatar asked Jan 05 '17 11:01

Ding Li


1 Answers

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
---
like image 51
Richard Telford Avatar answered Oct 29 '22 16:10

Richard Telford