諸君,我喜歡月島螢

w <- c(47,49,50,50,45)

h <- c(174,177,161,165,165)

mean(w) 
## [1] 48.2
mean(h) 
## [1] 168.4
median(w) 
## [1] 49
median(h)
## [1] 165
as.numeric(names(table(h)))[which.max(table(h))] 
## [1] 165
as.numeric(names(table(w)))[which.max(table(w))] 
## [1] 50
sd(h)
## [1] 6.76757
var(h)
## [1] 45.8
sd(w)
## [1] 2.167948
var(w)
## [1] 4.7
min(w)
## [1] 45
max(w)
## [1] 50
plot(w,h,pch=18,col="#FF8000", main ="我們五個的體重與身高", xlab ="體重", ylab ="身高")

plot(h,w,pch=18,col="#FFE153", main ="我們五個的體重與身高", xlab ="身高", ylab ="體重")

stem(w)
## 
##   The decimal point is at the |
## 
##   44 | 0
##   46 | 0
##   48 | 0
##   50 | 00
hist(w,col="orange")

x<- c(6,2,2,1) 
labels <- c("六月出生","七月出生","八月出生","九月出生")

pie(x,labels,main ="六到九月生日人數", col=topo.colors(length(x)))