---
title: "Homework 3"
author: "Your name here"
date: "9/13/2017"
---

# Reflection on readings

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?


# Exercises

```{r load-libraries, warning=FALSE, message=FALSE}
# Notice the warning=FALSE and message=FALSE in the chunk options. R spits out 
# a lot of messages when you load tidyverse and we don't want those in the 
# final document.
#
# Load tidyverse and any other libraries 
library(tidyverse)
```

## 3.2.4

**1\. Run `ggplot(data = mpg)`. What do you see?**

```{r, fig.width=2, fig.height=2}
ggplot(data = mpg)
```

I see a blank plot!

Notice how I used `fig.width` and `fig.height` in the chunk options. You can click on the little gear icon in the far left of the chunk to change other options.

Also notice how I put a `\` before the `.` in the question number. That's to tell Markdown that the number is an actual number and not the start of an ordered list. Without the extra slash, Markdown would parse the `1. Blah blah blah` as a list, not a paragraph. See:

1\. Something

vs.

1. Something
2. Something else
3. Another something else

**2\. How many rows are in `mpg`? How many columns?**

```{r}
nrow(mpg)
ncol(mpg)

# Or
dim(mpg)

# Or
mpg
```

**3\. What does the `drv` variable describe? Read the help for `?mpg` to find out.**

f = front-wheel drive, r = rear wheel drive, 4 = 4wd

**4\. Make a scatterplot of `hwy` vs `cyl`.**

```{r}
ggplot(data = mpg) + 
  geom_point(mapping = aes(x = cyl, y = hwy))
```

**5\. What happens if you make a scatterplot of `class` vs `drv`? Why is the plot not useful?**

```{r}
ggplot(data = mpg) + 
  geom_point(mapping = aes(x = class, y = drv))
```

I'm not going to give you that answer :)


## 3.3.1

## 3.5.1

## 3.6.1

## 3.8.1
