The function RnwToRmd converts a knitr file to a R markdown file. The conversion involves three steps:
- insert the knitr R code into LaTex "verbatim"environments, so that the Rnw file is now pure LaTex code
- use pandoc to convert the intermediate LaTeX file to a markdown file
- convert the knitr code chunks to R markdown
devtools::install_github('phenaff/RnwToRmd')