HW2_1921063필태연
2021-03-14
Chapter 1 Introduction
1921063 필태연 #code chunk 1,2,3,4
head(iris)
library(tidyverse) iris %>% pivot_longer(cols = -Species, names_to = “Part,” values_to = “Value”) %>% separate(col = “Part,” into = c(“Part,” “Measure”))
iris %>% pivot_longer(cols = -Species, names_to = “Part,” values_to = “Value”) %>% separate(col = “Part,” into = c(“Part,” “Measure”)) %>% group_by(Species, Part) %>% summarize(m = mean(Value))
iris %>% pivot_longer(cols = -Species, names_to = “Part,” values_to = “Value”) %>% separate(col = “Part,” into = c(“Part,” “Measure”)) %>% ggplot(aes(x = Value, color = Part)) + geom_boxplot()