---
title: "R Markdown and prettydoc"
subtitle: "The Architect Theme"
author: "Harald Schilly"
date: "`r Sys.Date()`"
output:
  prettydoc::html_pretty:
    theme: architect
---


```{r setup, include=FALSE}
# transparent plots
library(ggplot2)
theme_set(theme_bw(base_size=12))
theme_update(panel.background = element_rect(fill = "transparent", colour = NA),
             plot.background = element_rect(fill = "transparent", colour = NA))
knitr::opts_chunk$set(dev.args=list(bg="transparent"))
```

## Info

This is taken from [http://yixuan.cos.name/prettydoc/](http://yixuan.cos.name/prettydoc/)
showcasing the "Architect" theme.
Derived from work by Yixuan Qiu.

### Headers

#### Level 4

##### Level 5

### A demo table

|           | Df  | Sum Sq | Mean Sq | F value | Pr(>F)  |      |
| --------- | --- | ------ | ------- | ------- | ------- | ---- |
| Block     | 5   | 343.3  | 68.66   | 4.447   | 0.01594 | \*   |
| N         | 1   | 189.3  | 189.28  | 12.259  | 0.00437 | \*\* |
| P         | 1   | 8.4    | 8.40    | 0.544   | 0.47490 |      |
| K         | 1   | 95.2   | 95.20   | 6.166   | 0.02880 | \*   |
| N:P       | 1   | 21.3   | 21.28   | 1.378   | 0.26317 |      |
| N:K       | 1   | 33.1   | 33.14   | 2.146   | 0.16865 |      |
| P:K       | 1   | 0.5    | 0.48    | 0.031   | 0.86275 |      |
| Residuals | 12  | 185.3  | 15.44   |         |         |      |

### Lists

There are three kinds of lies:

1. Lies
2. Damned lies
3. Statistics
   - Frequentists
   - Bayesian
   - ...

Supported highlighters in `prettydoc`:

- `github`: Style similar to Github
- `vignette`: Style used by `rmarkdown::html_vignette`

### Markups

**Bold**, _italic_, <del>don't say this</del>.

### Code

Familiar `knitr` R code and plots:

```{r fig.width=6, fig.height=6, fig.align='center'}
n <- 1000
x1  <- matrix(sort(rnorm(n, mean = 2, sd = 2.5)), ncol = 2)
x2  <- matrix(rnorm(n, mean = 2.5, sd = 2.5), ncol = 2)
x   <- rbind(x1, x2)
smoothScatter(x, xlab = "x1", ylab = "x2")
head(x)
```

### Data Frame visualized via `knitr::kable`

```{r results='asis'}
knitr::kable(head(data.frame(x1=x1, x2=x2)))
```
