Home

Awesome

My PhD Thesis

This is my PhD thesis. I am adding it here to show how to do certain things using RMarkdown and the {gopherdown} package. Note that the original data was deleted (as per IRB) and I simulated some data to show how to create figures/tables in Chapter 4, but did not do this for every aspect of the thesis. This also allowed me to show some LaTeX code for creating tables. I also took the liberty of producing some new tables and used {ggplot2} (rather than base R) for plotting, so this is not a perfect re-creation of my thesis. (A PDF version of the original thesis can be found here.)

The PDF version of the thesis is in the _book/ directory.

Files and Directories (Edit These)

The following files and directories are the ones I updated, edited, and added content to in order to customize my thesis:

_bookdown.yml

This is the main configuration file for your thesis. Arrange the order of your chapters in this file and ensure that the names match the names in your folders.

index.Rmd

This file contains all the meta information (in the YAML) that helps create the thesis. I also included an R code chunk that loads all the packages and sets different global (e.g., scientific notation penalty) and knitr options (e.g., supress messages nd warnings in code chunks).

There are several YAML fields here to edit:

pre/

This folder contains all of the RMD files to be included in the front matter of your dissertation (e.g., abstract, acknowledgements, dedication). Since I didn't have a dedication I could have deleted the file 00-dedication.Rmd. However, having it there is not a big deal. I needed to comment out the lines in the YAML of index.Rmd where the dedication was being called.

chapters/

This folder contains the RMD files for each chapter in the dissertation, as well as the appendices. These files contain the main content for the thesis.

bib/

Store your bibliography as bibtex (.BIB) files here. I have the references for Chapters 1, 2, and 5 in the lit-references.bib file and those from Chapters 3 and 4 in methods-references.bib. If you have other .BIB files they can be included in this folder. You would also need to add them to the bibliography: YAML field in index.Rmd.

csl/

I added the apa.csl style file here. (The APA style file is added by default when you create a new document using {gopherdown}. If you want to use a different style file grab it from https://www.zotero.org/styles or https://github.com/citation-style-language/styles and add the CSL file to this folder. Then change the csl: YAML field in index.Rmd.

figure/

Here I have stored figures that I don't create within the RMD files (e.g., figures I created in Keynote). I call them in the chapter RMD files using knitr::include_graphics().

data/

Here I stored data sets (e.g., CSV files) that I call in the chapter RMD files.

--

Files and Directories (Do Not Edit)

The {gopherdown} package calls the thesis_pdf() function to create your thesis. It draws on the template.tex and umnthesis.cls files in the main directory. (Do not change these unless you know what you are doing!) When the thesis is rendered (clicking the knit button in the index.Rmd file), the _book and _bookdown_files directories are populated.

_book/

This directory includes your compiled thesis and all the relevant TEX files.

_bookdown_files

This directory includes things that the {bookdown} package creates when the PDF is compiled (e.g., PDF versions of all figures).

You should not edit these. To edit, change the RMD files or other files in the main directory.