I am working with knitr, polymode, ess and I would like to export just the R code from my .Rnw into a .R file. A basic file might look something like this:
\documentclass[a4paper]{article} My Rnw file <<>>= ##This is some R code 1+1 @ \end{document} In the end, I would like an R file with just
##This is some R code 1+1