Chapter 9 Appendix

9.1 Markdown

This is a sample book written in Markdown. You can use anything that Pandoc’s Markdown supports, e.g., a math equation \(a^2 + b^2 = c^2\).

9.2 Bookdown

The bookdown package can be installed from CRAN or Github:

Remember each Rmd file contains one and only one chapter, and a chapter is defined by the first-level heading #.

You can label chapter and section titles using {#label} after them, e.g., we can reference Chapter 1.

Figures and tables with captions will be placed in figure and table environments, respectively.

Here is a nice figure!

Figure 9.1: Here is a nice figure!

Reference a figure by its code chunk label with the fig: prefix, e.g., see Figure 9.1. Similarly, you can reference tables generated from knitr::kable(), e.g., see Table 9.1.

Table 9.1: Here is a nice table!
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
5.1 3.5 1.4 0.2 setosa
4.9 3.0 1.4 0.2 setosa
4.7 3.2 1.3 0.2 setosa
4.6 3.1 1.5 0.2 setosa
5.0 3.6 1.4 0.2 setosa
5.4 3.9 1.7 0.4 setosa
4.6 3.4 1.4 0.3 setosa
5.0 3.4 1.5 0.2 setosa
4.4 2.9 1.4 0.2 setosa
4.9 3.1 1.5 0.1 setosa
5.4 3.7 1.5 0.2 setosa
4.8 3.4 1.6 0.2 setosa
4.8 3.0 1.4 0.1 setosa
4.3 3.0 1.1 0.1 setosa
5.8 4.0 1.2 0.2 setosa
5.7 4.4 1.5 0.4 setosa
5.4 3.9 1.3 0.4 setosa
5.1 3.5 1.4 0.3 setosa
5.7 3.8 1.7 0.3 setosa
5.1 3.8 1.5 0.3 setosa

You can write citations, too. For example, we are using the bookdown package (Xie 2020) in this sample book, which was built on top of R Markdown and knitr (Xie 2015).

9.3 Tinytex

To compile this example to PDF, you need XeLaTeX. You are recommended to install TinyTeX (which includes XeLaTeX): https://yihui.name/tinytex/.

You can install and integrate TinyTex with R with the help of the tinytex package. It installs TinyTex and some basic tex libraries from CTAN that are required for

Antal, Daniel. 2020. iotables: Importing and Manipulating Symmetric Input-Output Tables. https://doi.org/10.5281/zenodo.3839319.
———. 2021a. Regions: Processing Regional Statistics. https://regions.danielantal.eu/.
———. 2021b. Retroharmonize: Ex Post Survey Data Harmonization. https://retroharmonize.dataobservatory.eu/.
D’Ignazio, Lauren, Catherine AND Klein. 2020. Weapons of Math Destruction: How Big Data Increases Inequality and Threatens Democracy. Boston:USA: MIT Press.
O’Neil, Cathy. 2016. Weapons of Math Destruction: How Big Data Increases Inequality and Threatens Democracy. USA: Crown Publishing Group.
Pomerantz, Jeffrey. 2015. Metadata. The MIT Press. http://www.jstor.org/stable/j.ctt1pv8904.
Xie, Yihui. 2015. Dynamic Documents with R and Knitr. 2nd ed. Boca Raton, Florida: Chapman; Hall/CRC. http://yihui.name/knitr/.
———. 2020. Bookdown: Authoring Books and Technical Documents with r Markdown. https://github.com/rstudio/bookdown.