You should first call knit()
on an R Markdown (*.Rmd
) document, which produces a Markdown (*.md
) document, and that is when you can run pandoc()
.
library(knitr)
knit('foo.Rmd')
pandoc('foo.md')
The R scripts in examples 084 and 088 as mentioned on the flaky website have illustrated how. Please also take a look at the Rmd documents to learn the syntax for R code chunks in R Markdown. If you still have 5 minutes, watch the video on the homepage, and I think all the confusion should be gone.