The combination of R Markdown and Knitr provides a very versatile environment for generating output. You can mix using Pandoc and LaTeX packages in your document to achieve a remarkable level of control over the output you produce. Previously I covered some simple methods to embed graphics in your R Markdown file output using just Pandoc syntax. The results were passable. We could include a caption, resize the image in a couple of ways, and include our image inline so that it it appeared within a row of text.
What we couldn’t do very well was position the image in the center of our PDF document output. This post will cover using LaTeX packages to achieve that along with a couple of other ways we can manipulate our images. (more…)