forked from andrewheiss/Harry-Potter-aggression
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hp_johns_test.Rmd
41 lines (28 loc) · 852 Bytes
/
hp_johns_test.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
---
title: "lab_6_jason"
author: "Jason Johns"
date: "11/7/2018"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
1. Load packages & read in data
```{r, include = FALSE}
#Load tidyverse & read in harry_potter_aggression_full.csv
library(tidyverse)
hp_data <- read_csv("harry_potter_aggression_full.csv")
```
2. Basic wrangling and make a graph of Harry Potter and Draco Malfoy aggression rates
```{r}
hp_graph <- hp_data %>%
filter(Name == "Harry" | Name == "Draco Malfoy") %>%
select(Name, book, agg.per.mention) %>%
ggplot(aes(x = book, y = agg.per.mention)) +
geom_col(aes(fill = Name), position = "dodge") +
coord_flip() +
theme_bw() +
labs(x = "books", y = "agression.rate")
hp_graph
```
I will be presenting a paper about the phylogenetic relaionships of leaf cell shape.