Reputation: 31
How do I change an .Rmd file to an .md file, that I can then push to GitHub? I have knit to HTML
Is it possible to do this by something as simple as changing the file extension to ".md" and doing a save as? Any insight into what the differences are amongst these types of files would be so helpful!
Also, how different should an .Rmd and .md file look when opened?
Thank you!
Upvotes: 0
Views: 3923
Reputation: 226192
You can use
knitr::knit("my_file.Rmd")
which should output my_file.md
(a Markdown file with included code chunks) and generate figures (in a figs/
directory, I think, not sure).
Upvotes: 1
Reputation: 6264
You can add keep_md
to your YAML header.
---
output:
html_document:
keep_md: true
---
Just be aware you will need to also push any related assets to Github as well as the .md
file
Upvotes: 1