dat <- iris head(iris,10) ?iris ##### 3 different species : Iris stosa, veriscolor, virginica dat %>% group_by(Species) %>% summarise(AVG = mean(Sepal.Length, na.rm = T), SD = sd(Sepal.Length, na.rm = T), Median = median(Sepal.Length, na.rm = T)) dat %>% group_by(Species) %>% summarise(AVG = mean(Sepal.Width), na.rm = T), SD = sd(Sepal.Width, na.rm = T), Median = median(Sepal.Width, na.rm = T))

dat %>% group_by(Species) %>% summarise(AVG = mean(Petal.Length, na.rm = T), SD = sd(Petal.Length, na.rm = T), Median = median(Petal.Length, na.rm = T))

dat %>% group_by(Species) %>% summarise(AVG = mean(Petal.Width, na.rm = T), SD = sd(Petal.Width, na.rm = T), Median = median(Petal.Width, na.rm = T))

######(3) 1), 2)번에서 나온 결과를 한 문단으로 서술해보기 dat %>% ggplot(aes(Species, Sepal.Length)) + geom_boxplot() ggplot(aes(Species, Sepal.Width)) + geom_boxplot() ggplot(aes(Species, Petal.Length)) + geom_boxplot() ggplot(aes(Species, Petal.Width)) + geom_boxplot()

####(box plot수업시간 때 보고 다시 제출해도 될까요?)

#####5 species와 가장 관련이 많아(상관이 높아) 보이는 ####feature가 무엇인지 생각해보고, ####선택한 이유 설명하기 (정답이 없음!) ####페탈의 길이와 넓이가 가장 관련이 많아보인다. ####setosa species의 petal width는 0에서 1을 넘지 않고 #### versicolor의 petal width는 1을 넘지만 모두 2를 넘지 않는다. ####또한 virginica의 petal width는 대부분 1. 후반대이고, 2.초반대이다. ####그러므로 species예 따라 petal width의 범위가 달라지는 것을 보아 ####식물의 species와 petal의 성질에 대해 상관관계가 가장 높다고 볼 수 있다. #### petal length도 sentosa에서 veriscolor,versicolor에서 virginica순으로 #### 커지는 것을 볼 수 있다

summary(cars)
##      speed           dist       
##  Min.   : 4.0   Min.   :  2.00  
##  1st Qu.:12.0   1st Qu.: 26.00  
##  Median :15.0   Median : 36.00  
##  Mean   :15.4   Mean   : 42.98  
##  3rd Qu.:19.0   3rd Qu.: 56.00  
##  Max.   :25.0   Max.   :120.00

Including Plots

You can also embed plots, for example:

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.