I really like using knitr
in Rstudio and have been using it to write markdown presentations and data analysis. I want to use the same code and results in a paper and want to convert the code chunks in Rmd file ```{r}
to the chunks of Rnw file << >>= @
.
This allows using the same document and code written for presentation for the main paper as well.
Is there a way of converting between code chunks of markdown and Rnw files ?
or the entire file itself as apart from the difference in syntax of code chunks, they are quite similar in the markup (converting the text to latex is easy with say pandoc)