I'm trying to run a basic R Markdown document (that calls python in code chunks) through Pweave. In the Pweave documentation it states that you can declare code chunks using the style ```{python}. However when I try to compile using, for example, pweave -f pandoc FIR_design.mdw the chunks are not run and instead placed in verbatim.
All the examples in the documentation use the noweb syntax e.g.
<<fig = True, width = '12 cm', echo = False>>=
from pylab import *
plot(arange(10))
show()
@
The markdown equivalent would be:
```{python, fig = True, width = '12 cm', echo = False}
from pylab import *
plot(arange(10))
show()
```
When I try to run the examples using the markdown syntax it simply adds them in verbatim and doesn't run the chunk. Is this expected? If so, how should I be converting my .Rmd documents to make them runable in Pweave. Must I convert them to noweb style?
Here is the documentation example document FIR_design.mdw rewritten in .Rmd format (for examples):
nowebstyle work?pweave -f pandoc FIR_design.mdw. I've made an edit to the below solution which solves the problem. Given an.Rmdfile, usepweave -i markdown <source>.Rmd.