weight <- c(50,60,70,80,90,95)

height <- c(150,160,170,175,180,185)

mean(weight)
## [1] 74.16667
median(height)
## [1] 172.5
as.numeric(names(table(weight)))[which.max(table(weight))] 
## [1] 50
sd(weight)
## [1] 17.44037
 var(weight)
## [1] 304.1667
 min(weight)
## [1] 50
 max(weight)
## [1] 95
 plot(weight,height)

 plot(weight,height,pch = 15, col= "pink",main ="體重與身高")

 stem(weight)
## 
##   The decimal point is 1 digit(s) to the right of the |
## 
##   5 | 0
##   6 | 0
##   7 | 0
##   8 | 0
##   9 | 05
 hist(height,col= "pink")

o<- c(1,2,2,5) 
labels <- c("50-60","60-70","70-80","80-90") 

pie(o,labels,main ="體重分布", col=heat.colors(length(o)))

knitr::include_graphics("C:/Users/wenzao/Desktop/1.jpg")