s = system.file("misc", "stitch-test.R", package = "knitr")
stitch(s)
# HTML report
stitch(s, system.file("misc", "knitr-template.Rhtml", package = "knitr"))
# or convert markdown to HTML
stitch(s, system.file("misc", "knitr-template.Rmd", package = "knitr"))
Run the code above in your browser using DataLab