x<-c(23,22,33,43,55,21,21,23)
mean(x)
## [1] 30.125
mode(x)
## [1] "numeric"
range(x)
## [1] 21 55
sd(x)
## [1] 12.68787
var(x)
## [1] 160.9821
summary(x)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 21.00 21.75 23.00 30.12 35.50 55.00
# data visualization
#histogram, box plot,density, polygon
#vioplot, beanplot,beeswarm
y<-c(23,22,33,43,55,21,21,23)
hist(y)

boxplot(y)
z<-c(23,22,33,43,55,21,21,23)
boxplot(z)

plot(density(y))
polygon(density(y), col = "red")

windows()
hist(y,col = "green",xlab = "age",ylab = "weight",
main = "medical statistical group")
windows()
boxplot(y,col = "blue",xlab = "age",ylab = "weight",
main="medical statistical group")
windows()