a collection of knitr examples
TeX HTML Other
Pull request Compare This branch is 8 commits behind yihui:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
001-minimal.Rmd
001-minimal.md
002-minimal.Rnw
002-minimal.tex
003-minimal.Rhtml
003-minimal.html
004-minimal.brew
004-minimal.txt
005-latex.Rtex
005-latex.tex
006-minimal.Rrst
006-minimal.rst
007-text-output.Rmd
007-text-output.md
008-outdec.Rnw
008-outdec.tex
009-slides.Rmd
009-slides.md
010-upload.Rmd
010-upload.md
011-conditional-eval.Rnw
011-conditional-eval.tex
012-line-breaks.Rmd
012-line-breaks.md
013-par.Rnw
013-par.tex
014-sweave.Rnw
014-sweave.tex
015-listings.Rnw
015-listings.tex
016-device.Rnw
016-device.tex
017-auto-dependson.Rnw
017-auto-dependson.tex
018-fullfig-tikz.Rnw
018-fullfig-tikz.tex
019-fig-caption.Rnw
019-fig-caption.tex
020-for-loop.Rnw
020-for-loop.tex
020-for-template.rnw
021-ggplot2-geoms.Rnw
021-ggplot2-geoms.tex
022-nothing.Rmd
022-nothing.md
023-engine-python.Rmd
023-engine-python.md
024-engine-awk.Rmd
024-engine-awk.md
025-engine-ruby.Rmd
025-engine-ruby.md
026-engine-haskell.Rmd
026-engine-haskell.md
027-engine-bash.Rmd
027-engine-bash.md
028-engine-perl.Rmd
028-engine-perl.md
029-engine-Rcpp.Rmd
029-engine-Rcpp.md
030-landscape.Rnw
030-landscape.tex
031-noindent.Rnw
031-noindent.tex
032-persp.Rnw
032-persp.tex
033-file-extension.Rnw
033-file-extension.tex
034-chinese.Rhtml
034-chinese.html
035-optipng.Rmd
035-optipng.md
036-latex-if.Rnw
036-latex-if.tex
037-graphics-hyperlink.Rnw
037-graphics-hyperlink.tex
038-output-width.Rnw
038-output-width.tex
039-merge.Rmd
039-merge.md
040-grid-table.Rnw
040-grid-table.tex
041-label-i-child.tpl
041-label-i.Rmd
041-label-i.md
042-highlight-matlab.Rnw
042-highlight-matlab.tex
043-percent.Rnw
043-percent.tex
044-size.Rnw
044-size.tex
045-chunk-hook.Rmd
045-chunk-hook.md
046-read-rforge.Rmd
046-read-rforge.md
047-tikz-png.Rnw
047-tikz-png.tex
048-cars-demo.Rnw
048-cars-demo.tex
049-cars-demo.Rmd
049-cars-demo.md
050-allowframebreaks.Rnw
050-allowframebreaks.tex
051-flowchart.Rnw
051-flowchart.tex
052-suppress-output.Rmd
052-suppress-output.md
053-beamer-only.Rnw
053-beamer-only.tex
054-loop-plots.Rmd
054-loop-plots.md
055-multicols.Rnw
055-multicols.tex
056-huge-plot.Rmd
056-huge-plot.md
057-engine-dot.Rmd
057-engine-dot.md
058-engine-tikz.Rmd
058-engine-tikz.md
059-tikz.Rnw
059-tikz.tex
060-engine-sas.Rmd
060-engine-sas.md
061-bash-variable.Rmd
061-bash-variable.md
062-chunk-wrapper.Rmd
062-chunk-wrapper.Rnw
062-chunk-wrapper.md
062-chunk-wrapper.tex
063-html5-figure.Rmd
063-html5-figure.md
064-bib-plot.Rnw
064-bib-plot.tex
065-rmd-chunk.Rmd
065-rmd-chunk.md
066-listings-breaklines.Rnw
066-listings-breaklines.tex
067-graphics-options.Rnw
067-graphics-options.tex
068-beamer-simple.Rnw
068-beamer-simple.tex
069-for-loop.Rnw
069-for-loop.tex
069-for-template.rnw
070-caption-num.Rmd
070-caption-num.md
071-cleveref-examples.Rnw
071-cleveref-examples.tex
072-latex-reference.Rnw
072-latex-reference.tex
073-code-appendix.Rnw
073-code-appendix.tex
074-example-environment.Rnw
074-example-environment.tex
075-knit-expand.Rnw
075-knit-expand.tex
075-template.rnw
076-chinese-gb2312.TEX
076-chinese-gb2312.rnw
077-wrap-output.Rmd
077-wrap-output.md
078-chinese-big5.ctx
078-chinese-big5.rnw
079-eval-echo.Rmd
079-eval-echo.md
080-engine-coffeescript.Rmd
080-engine-coffeescript.md
081-hello-chinese.lyx
082-sweave-color.Rnw
082-sweave-color.tex
083-ggplot2-reference.Rmd
083-ggplot2-reference.md
084-pandoc-more.bib
084-pandoc.R
084-pandoc.Rmd
084-pandoc.bib
084-pandoc.md
084-pandoc.pandoc
085-pdfcrop.Rnw
085-pdfcrop.tex
086-xtable-examples.Rnw
086-xtable-examples.tex
087-child-example-child.rnw
087-child-example.Rnw
087-child-example.tex
088-pandoc-embedded.R
088-pandoc-embedded.Rmd
088-pandoc-embedded.md
089-minimal.Rasciidoc
089-minimal.txt
090-engine-c.Rmd
090-engine-c.md
091-knitr-table.Rnw
091-knitr-table.tex
092-latex-rgl.Rnw
092-latex-rgl.tex
093-knitr-asy.Rmd
093-knitr-asy.md
094-purl.R
094-purl.Rmd
094-purl.md
095-pandoc-header.Rmd
095-pandoc-header.md
096-knit-exit.Rmd
096-knit-exit.md
097-Hmisc-scale.Rnw
097-Hmisc-scale.tex
098-highlight-python.Rnw
098-highlight-python.tex
099-include-graphics.Rmd
099-include-graphics.md
100-alltt-verbatim.Rnw
100-alltt-verbatim.tex
101-cache-levels.Rmd
101-cache-levels.md
102-stitch-test.R
102-stitch.R
103-move-float.Rnw
103-move-float.tex
104-subfigure.Rnw
104-subfigure.tex
105-minimal.Rtextile
105-minimal.textile
106-polyglot.Rmd
106-polyglot.md
107-inline-linebreak.Rmd
107-inline-linebreak.md
108-animation-scianimator.Rmd
108-animation-scianimator.md
109-longstrings.Rnw
109-longstrings.tex
110-rmarkdown-landscape.Rmd
110-rmarkdown-landscape.md
111-engine-fortran.Rmd
111-engine-fortran.md
112-yaml-in-child-child.rmd
112-yaml-in-child.Rmd
112-yaml-in-child.md
113-externalization.Rmd
113-externalization.md
113-foo.R
114-load-cache.Rmd
114-load-cache.md
Makefile
R-packages
k
knitall
knitr-examples.Rproj
readme.md

readme.md

knitr examples

This repository is a collection of knitr examples. It is both for my own test purpose and for other knitters to learn about this package.

For each input file, there is an output file, e.g. 001-minimal.Rmd corresponds to 001-minimal.md.

Integration tests

The examples can be checked automatically with Travis CI. To enable:

  • Fork this repository and knitr
  • Enable Travis CI for your knitrfork
  • In your knitr fork, create a branch with the same name as in your knitr-examples fork
    • You can also choose to work in master in both repositories

Now, each time you push to knitr, the examples are compiled and checked for differences with the expected result. Use this for major changes to knitr to avoid undesired side effects.