-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmythology.R
61 lines (58 loc) · 2.37 KB
/
mythology.R
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
name <- c("Loki", "Thor", "Odin", "Athena", "Zeus", "Hades", "Hel", "Isis", "Minerva", "Jupiter", "Osiris", "Pluto", "Baldur", "Pan", "Echo", "Valkyrie", "Aphrodite", "Heracles", "Hercules")
pantheon <- c("Norse", "Norse", "Norse", "Greek", "Greek", "Greek", "Norse", "Egyptian", "Roman", "Roman", "Egyptian", "Roman", "Norse", "Greek", "Greek", "Norse", "Greek", "Greek", "Roman")
type <- c("god", "god", "god", "god", "god", "god", "god", "god", "god", "god", "god", "god", "god", "god", "other", "warrior", "god", "warrior", "warrior")
domain <- c("Mischief", "Thunder", "Ruler", "Wisdom", "Ruler", "Underworld", "Underworld", "Nature", "Wisdom", "Ruler", "Underworld", "Underworld", "Beauty", "Nature", "Echo", "Fallen Heroes", "Beauty", "Strength", "Strength")
gender <- c("M", "M", "M", "F", "M", "M", "F", "F", "F", "M", "M", "M", "M", "M", "F", "F", "F", "M", "M")
gender_factor <- factor(gender)
levels(gender_factor) <- c("Female", "Male")
home <- c("Asgard", "Asgard", "Asgard", "Mt. Olympus", "Mt. Olympus", "Hell", "Hell", "Earth", "Mt. Olympus", "Mt. Olympus", "Hell", "Hell", "Asgard", "Earth", "Earth", "Earth", "Mt. Olympus", "Earth", "Earth")
deities <- data.frame(name, pantheon, type, domain, gender_factor, home)
deities
str(deities)
summary(deities)
location <- c("Asgard", "Earth", "Hell", "Mt. Olympus")
placement <- c("H", "M", "L", "H")
placement_factor <- factor(placement, ordered = TRUE, levels = c("L", "M", "H"))
levels(placement_factor) <- c("Down Below", "In the Middle", "High Above")
places <- data.frame(location, placement_factor)
summary(placement_factor)
str(placement_factor)
summary(places)
str(places)
places
library(tidyverse)
library(readxl)
library(dplyr)
in_deities <- read_excel("Deities.xlsx")
View(in_deities)
in_deities
in_deities[3:4,1:2]
in_deities["Pantheon"]
in_deities %>%
filter(Name == "Loki")
in_deities %>%
count(Pantheon)
in_deities %>%
count(Home)
in_deities %>%
filter(Pantheon == "Norse")
in_deities %>%
filter(Pantheon == "Norse", Home == "Asgard")
in_deities %>%
filter(Pantheon == "Norse", Home == "Asgard")
in_deities %>%
filter(Pantheon == "Greek", Home != "Mt. Olympus")
in_deities %>%
count(Pantheon)
in_deities %>%
count(Pantheon)
in_deities %>%
filter(Pantheon != "Greek") %>%
count(Pantheon)
in_deities %>%
count(Pantheon != "Greek")
in_deities %>%
filter(Domain == "Underworld")
in_deities %>%
filter(Domain == "Underworld") %>%
count()