ABSTRACT

This chapter discusses how to include non-knitted graphics in LaTeX and Markdown documents and looks at how to dynamically knit R graphics into presentation documents. It focuses on how to include the figures created by these graphics packages in knitted presentation documents. Sometimes either a package does not have built-in commands for plotting model results the way the reader want to and/or he/she want to use ggplot2 to improve the aesthetic quality of the plots they do create by default. The main way to include graphics in LaTeX documents is to use the includegraphics command to link to image files. Markdown has a similar command as LaTeX’s includegraphics. One of the main reasons that many people use R is to take advantage of its comprehensive and powerful set of data visualization tools. R’s graphics package–loaded by default–includes commands to create numerous plot types. Most of R’s default graphics capabilities create static graphics.