Structure of the book

The book is broken down into small “recipes” that aim to demonstrate a single concept at a time. Chapter 1 provides instructions on how to install the necessary software tools. Chapter 2 gives a conceptual overview of R Markdown. Chapter 3 introduces the basic components of R Markdown, and how to convert between R Markdown documents and R scripts. Chapter 4 tells you how to generate certain document elements, such as page breaks, bibliographies, numbered figures, animations, and diagrams, etc. Chapter 5 shows how to format the content, such as adjusting the figure size and alignment. Chapter 6 introduces tips and tricks to those who only want LaTeX/PDF output. Similarly, Chapter 7 is for HTML users, and Chapter 8 is for Word users. If you want to produce output documents of multiple output formats (which is often tricky), you may find Chapter 9 useful. Chapter 10 is, to be honest, my least favorite chapter, but I know a lot of users really want to learn how to produce tables. I’m not an expert on fancy tables, but hope you will at least find the list of packages there helpful. Chapter 11 shows some applications of knitr’s chunk options that you may not know. Chapter 12 and Chapter 13 are a little advanced, but should also be very useful because they show you the great power of being able to control knitr’s output and behavior with custom hook functions. Chapter 14 introduces a variety of knitr tricks. Chapter 15 shows examples of using other languages in R Markdown, so you know R Markdown is not only for R. It also teaches you how to make knitr work with a new language that has not been supported yet. Chapter 16 introduces tips on managing projects related to R Markdown. Chapter 17 presents some tips on enhancing your workflow.

The recipes in this book are usually independent to each other, so you can pick up any one to read if you do not have a specific goal in mind.