---
title: 'Lab Session 1 Solution'
author: "David A. Selby"
date: "`r format(Sys.Date(), '%A %e %B %Y')`"
output:
  word_document: default
  html_document: default
---

I am writing in Markdown. It is intended to be

1. easy to read and
1. easy to write.

Literate programming *emphasises* the idea that source `code` should be human-readable **and** computer-executable.

Like \(\LaTeX\), Markdown can support mathematical expressions, such as \(E = mc^2\).

![A chick.](http://www.giftsofcompassion.org.uk/wp-content/uploads/Chick.jpg)

```{r chickplot, echo = FALSE}
plot(chickwts$weight ~ chickwts$feed,
     xlab = 'Feed type',
     ylab = 'Weight (grams)',
     col = 'goldenrod1')
```
There are `r nrow(chickwts)` rows in the `chickwts` dataset. The grand mean weight is `r round(mean(chickwts$weight), 1)` grams; the overall minimum weight is `r min(chickwts$weight)` grams and the maximum `r max(chickwts$weight)` grams. The standard deviation is `r round(sd(chickwts$weight), 1)` grams.

*I have `round`ed the values of the mean and standard deviation above to one decimal place.*

Here are the first six rows of the `chickwts` dataset.

```{r tables}
knitr::kable(head(chickwts))
```

The code used to generate the above boxplot is reproduced below.

```{r}
```{r chickplot, eval = FALSE}
```

NB: Microsoft Word does not actually use LaTeX to render mathematical expressions, so the `\LaTeX` command doesn't do anything in this case.