How to convert Rmarkdown (Rmd) to markdown (md)?

knitr:knit("rmarkdown.Rmd")

Or

library(rmarkdown)
render("rmarkdown.Rmd", md_document("markdown_github"))