ThesisIsCode

Your Markdown Thesis - Advantages


Your Markdown Thesis - Disadvantages


Overall Benefits


Getting Started


Start a New RMarkdown File


How Do We Write?

Process of writing papers, bibliography takes the entire life of the paper, writing as well, raw data is used early on, then data cleaning, data analysis and data presentation work.


Main Elements

<img src="../images/RPROJECT_2000dpi.png" width=30% alt="Project setup">

image ref


Main Elements


Main Elements - YAML

---
title: Some title
author: Simon Goring
---

YAML - Continues

---
title: Some title
author: 
- Simon Goring
- Socorro Dominguez
abstract: >
  I can move stuff to a new line.
---

YAML - Continues pt 2

---
title: Some title
author: 
- Simon Goring
- Socorro Dominguez
abstract: >
  I can move stuff to a new line.
---

Format specific options for html, pdf, Word, &cetera.


Main Elements - Markdown


Main Elements - Code Blocks

Here is writing
```{r namedCodeBlock}
this <- is(code)
```
Here is writing that uses `r this` result.

Then knit the Document

A zoom of the RStudio page, showing the knit button.

Rscript -e "rmarkdown::render('filename.Rmd')"

Or, with bash (Mac & Linux) you can build on save.


Let’s all Gaze in Wonder


Main Elements - Data Import

```{r loadData}
table <- read.csv('data/input/GitHubRepos.csv')
```

The table has `r nrow(rows)`, but there are less READMEs than a dozen eggs.

How Does it Look?


Using Assertions


Why Use Assertions?

```{r loadData}
table <- read.csv('data/input/GitHubRepos.csv')
```

The table has `r nrow(rows)`, but there are less READMEs than a dozen eggs.

Writing Assertions

assertthat::assert_that(sum(!is.na(table$README)) < 12, msg="There are more readme's than a dozen eggs.")

Summary