how to install packges in R.
##packges
use”install.packages” to install packages in R. to make italic statistics. to make bold probability
to add code
x<-c(21,12,14,15)
mean(x)
## [1] 15.5
median(x)
## [1] 14.5
mode(x)
## [1] "numeric"
sd(x)
## [1] 3.872983
var(x)
## [1] 15
range(x)
## [1] 12 21
summary(x)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 12.0 13.5 14.5 15.5 16.5 21.0
# Data visualization
# histogram , box plot , density , polygon
# vioplot, beanplot, bee swarm
y<-c(12,12,12,13,21,23,24,25,18,19,20,21)
hist(y)
boxplot(y)
z<-c(12,12,12,13,21,23,24,25,18,19,20,21,89)
boxplot(z)
plot(density(y))
polygon(density(y),col = "red")
hist(y,col="green",xlab = "age",ylab = "weight",,
main = "medical statistics group")
boxplot(y,col="blue",xlab = "age",ylab = "weight",
main = "medical statistics group")