-
Notifications
You must be signed in to change notification settings - Fork 0
/
2-starwars_characters.Rmd
79 lines (37 loc) · 932 Bytes
/
2-starwars_characters.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
---
title: "Star Wars Character Data"
author: "Angela Zoss"
date: "3/20/2019"
output: html_document
---
## Setup your environment
```{r}
# Load required libraries
library(tidyverse)
```
## Load your data
```{r}
# built-in data
starwars_chars <- starwars
```
## Create a plot to explore the height of Star Wars characters
```{r}
# hint: height is numerical;
# look for geoms that do a good job of summarizing numerical variables
```
## Add a facet to the chart to create small multiples for each gender
```{r}
# hint: try facet_wrap
```
## Create a new plot to compare character heights to weights (masses)
```{r}
# what geom is best for two numerical variables?
```
## Add a linear trend line
```{r}
# hint: look at the options for geom_smooth
```
## Add a label to (only) the heaviest character
```{r}
# hint: you can use "data=" in a geom layer to use different data for that layer
```