You are processing the .Rmd
file with pandoc
where you should be processing the .md
file created after running mdown.Rmd
through knitr.
knit('mdown.Rmd')
system('pandoc -s -t slidy mdown.md -o mdown.html')
The .Rmd
file is simply the original file you showed above.