Dynamic documents with R and knitr Machine generated contents note: 2.1.Literature 2.2.Good and Bad Practices 2.3.Barriers 3.1.Setup 3.2.Minimal Examples 3.2.1.An Example in LATEX 3.2.2.An Example in Markdown 3.3.Quick Reporting 3.4.Extracting R Code 4.1.RStudio 4.2.LYX 4.3.Emacs ESS 4.4.Other Editors 5.1.Input Syntax 5.1.1.Chunk Options 5.1.2.Chunk Label 5.1.3.Global Options 5.1.4.Chunk Syntax 5.2.Document Formats 5.2.1.Markdown 5.2.2.LATEX 5.2.3.HTML 5.2.4.reStructuredText 5.2.5.Customization 5.3.Output Renderers 5.4.R Scripts 6.1.Inline Output 6.2.Chunk Output 6.2.1.Chunk Evaluation 6.2.2.Code Formatting 6.2.3.Code Decoration 6.2.4.Show Hide Output 6.3.Tables 6.4.Themes 7.1.Graphical Devices 7.1.1.Custom Device 7.1.2.Choose a Device 7.1.3.Device Size 7.1.4.More Device Options 7.1.5.Encoding 7.1.6.The Dingbats Font 7.2.Plot Recording 7.3.Plot Rearrangement 7.3.1.Animation 7.3.2.Alignment 7.4.Plot Size in Output 7.5.Extra Output Options 7.6.The tikz Device 7.7.Figure Environment 7.8.Figure Path 8.1.Implementation 8.2.Write Cache 8.3.When to Update Cache 8.4.Side Effects 8.5.Chunk Dependencies 8.5.1.Manual Dependency 8.5.2.Automatic Dependency 9.1.Chunk Reference 9.1.1.Embed Code Chunks 9.1.2.Reuse Whole Chunks 9.2.Code Externalization 9.2.1.Labeled Chunks 9.2.2.Line based Chunks 9.3.Child Documents 9.3.1.Input Child Documents 9.3.2.Child Documents as Templates 9.3.3.Standalone Mode 10.1.Chunk Hooks 10.1.1.Create Chunk Hooks 10.1.2.Trigger Chunk Hooks 10.1.3.Hook Arguments 10.1.4.Hooks and Chunk Options 10.1.5.Write Output 10.2.Examples 10.2.1.Crop Plots 10.2.2.rgl Plots 10.2.3.Manually Save Plots 10.2.4.Optimize PNG Plots 10.2.5.Close an rgl Device 10.2.6.WebGL 11.1.Design 11.1.1.The Engine Function 11.1.2.Engine Options 11.2.Languages and Tools 11.2.1.C++ 11.2.2.Interpreted Languages 11.2.3.TikZ 11.2.4.Graphviz 11.2.5.Highlight 12.1.Chunk Options 12.1.1.Option Aliases 12.1.2.Option Templates 12.1.3.Program Chunk Options 12.1.4.Code in Appendix 12.2.Package Options 12.3.Typesetting 12.3.1.Output Width 12.3.2.Message Colors 12.3.3.Box Padding 12.3.4.Beamer 12.3.5.Suppress Long Output 12.3.6.Escape Special Characters 12.3.7.The Example Environment 12.4.Utilities 12.4.1.R Package Citation 12.4.2.Image URI 12.4.3.Upload Images 12.4.4.Compile Documents 12.4.5.Construct Code Chunks 12.4.6.Extract Source Code 12.4.7.Reproducible Simulation 12.4.8.R Documentation 12.4.9.Rst2pdf 12.4.10.Package Demos 12.4.11.Pretty Printing 12.4.12.A Macro Preprocessor 12.5.Debugging 12.6.Multilingual Support 13.1.RStudio 13.2.Pandoc 13.3.HTML5 Slides 13.4.Jekyll 13.5.WordPress 14.1.Homework 14.2.Web Site and Blogging 14.2.1.Vistat and Rcpp Gallery 14.2.2.UCLA R Tutorial 14.2.3.The cda and RHadoop Wiki 14.2.4.The ggbio Package 14.2.5.Geospatial Data in R and Beyond 14.3.Package Vignettes 14.3.1.PDF Vignette 14.3.2.HTML Vignette 14.4.Books 14.4.1.This Book 14.4.2.The Analysis of Data 14.4.3.The Statistical Sleuth in R 15.1.Sweave 15.1.1.Syntax 15.1.2.Options 15.1.3.Problems 15.2.Other R Packages 15.3.Python Packages 15.3.1.Dexy 15.3.2.Python TEX 15.3.3.IPython 15.4.More Tools 15.4.1.Org mode 15.4.2.SASweave 15.4.3.Office A.1.Documentation A.2.Closures A.3.Implementation A.3.1.Parser A.3.2.Chunk Hooks A.3.3.Option Aliases A.3.4.Cache A.3.5.Compatibility with Sweave A.3.6.Concordance A.4.Syntax