How to install packages in R.
Use “install.packages” to install packages in R to make italic statistics.
to make bold probability
to add code
# How to install packages in R
x<-c(21,12,13,14,15)
mean(x)
## [1] 15
median(x)
## [1] 14
range(x)
## [1] 12 21
mode(x)
## [1] "numeric"
sd(x)
## [1] 3.535534
var(x)
## [1] 12.5
summary(x)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 12 13 14 15 15 21
# Data Visualization
# Histogram, Box plot , Density, Polygon
# Vioplot , Beanplot , Beeswarm
y<-c(12,12,12,13,21,23,24,25,18,19,20,21)
windows()
hist(y)
windows()
boxplot(y)
z<-c(12,12,12,13,21,23,24,25,18,19,20,21,89)
windows()
boxplot(z)
windows()
plot(density(y))
windows()
plot(density(y))
polygon(density(y),col = "red")
windows()
hist(y,col="green",xlab = "age",ylab="weight",
main="medical statistics group")
windows()
boxplot(y,col="blue",xlab = "age",ylab="weight",
main="medical statistics group")
windows()
plot(density(y))
polygon(density(y), col="magenta",border="black",
xlab = "age",ylab="weight",
main="medical statistics group")