---
title: "Data Subsetting, Part 1 - Lab"
output: html_document
editor_options: 
  chunk_output_type: console
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

In this lab you can use the interactive console to explore but please record your commands here.  Remember anything you type here can be "sent" to the console with Cmd-Enter (OS-X) or Cntr-Enter (Windows/Linux) (But only in side the ```{r}``` areas).

```{r, message = FALSE}
library(tidyverse)
```


1. Check to see if you have the `mpg` dataset [hint: it's in the `ggplot2` package].

```{r}



```


2. How many observations (rows) and variables (columns) are in the `mpg` dataset?

```{r}



```

3. Select the `manufacturer`, `model` and `year` columns from the `mpg` dataset.

```{r}



```

4. Identify the subset of cars/rows where city fuel economy (`cty`) is greater than 20 and highway fuel economy (`hwy`) is greater than 30. Assign this output to an object called `eff`. How many cars/rows are present?

```{r}



```

5. How many fuel efficient cars (in the `eff` dataset) were manufactured in the year 1999?

```{r}



```


6. Filter cars to only those in the "suv" or "minivan" class. How many cars/rows are there?

```{r}



```


7. Filter cars with displacements (`displ`) greater than 4 and that are all 4 wheel drive (`drv`) (a value of 4 for `drv`). How many cars/rows are there. 

```{r}



```

## Practice on your own

8. Filter cars from the overall mpg dataset that do not have 4 cylinder engines. How many cars/rows are there?

```{r}



```

