data presentation in r

in this module we will

ths most common ones are:

boxplot

boxplot is used to summarize

minimum

maximum

upper quartile

lower quartile

th most common advantage

x<-rnorm(1000)
mean(x)
## [1] 0.006205463
var(x)
## [1] 0.9875537
boxplot(x)

set.seed(123)
y<-rnorm(1000)
mean(y)
## [1] 0.01612787
var(y)
## [1] 0.9834589
boxplot(y,col="blue",main="normal distrubution data",set.seed(123),xlab="time in years",ylab="cumulative frequency",border="red")

vioplot

the vioplot is an advanced plot used to represent the most common charactrestics of the data set.

library(vioplot)
## Loading required package: sm
## Package 'sm', version 2.2-5.7: type help(sm) for summary information
## Loading required package: zoo
## 
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
## 
##     as.Date, as.Date.numeric
set.seed(111)
z<-rweibull(1000,2,3)
mean(z)
## [1] 2.665132
var(z)
## [1] 1.901237
vioplot(z,col="magenta",main="weibull distribution data",xlab="time in months",ylab="cumulative frequency",border="blue")

acceleration

\[a=\frac{v-u}{t}\]

weight

\[w={m}{g}\]

set.seed(252)
xy<-rgamma(500,2,2)
mean(xy)
## [1] 1.004885
plot(density(xy))

plot(density(xy),col="red")
polygon(density(xy),col="lightblue",border = "black")