```{r setup, echo=FALSE, include=FALSE, warning=FALSE, message=FALSE}
library(ggplot2)
library(xtable)
library(knitcitations)
```

# Heading 1

## Heading 2

### Heading 3

Paragraphs are on their own line.

Here's another paragraph.

Simple formatting like **bold** and *italics*.

Lists:

 - item 1
 - item 2
 - item 3
 
Bullets:

 * item 1
 * item 2
 * item 3
 
Numbered:

 1. item 1
 1. item 2
 1. item 3

```{r example_code_block}
message("Hello")
x <- 5
```

The value of x in `r x`

```{r code_block_2, echo=FALSE}
y <- 15
```

## Figures

```{r figure_example, fig.width=9, fig.height=5, fig.path="knitr_demo_figures/"}
g <- ggplot(mtcars, aes(x=as.factor(cyl), y=mpg)) +
     geom_boxplot()
g
```

## Tables

```{r table_example, results="asis"}
mtcars.xt <- xtable(mtcars, digits=0)
digits(mtcars.xt)[c(2, 6:8)] <- 2
print(mtcars.xt, type="html")
```

## Citations

To use knitcitations, you call citet() or citep() with a DOI.

Later we'll use Bioconductor `r citep("10.1186/gb-2004-5-10-r80")`.

## References

```{r references, echo=FALSE, results="asis"}
bibliography(style="markdown")
```

