1. Histogram
hist(rnorm(100,0,1),breaks=8);
2. Boxplot
x<-read.table("newbedfordTempMonth.Data");
names(x)<-c("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");
boxplot(x[,1], col="orange", cex.lab=1.5, cex.axis=1.5, font=2);
boxplot(x, col="orange", cex.lab=1.5, cex.axis=1.5, font=2);
3. Stem-and-leaf plot
x<-c(2.21, 2.24,2.28,2.33,2.37,2.52,2.79,2.81,2.82,2.82,2.83,2.83);
stem(x, scale=2);
4. QQ-plot
qqnorm(rnorm(100,0,1));
abline(0,1);
qqnorm(runif(100,0,1));
abline(0,1);
5. Skewness and kurtosis
##Uncomment when running for the first time
##install.packages("moments");
library(moments);
x<-read.table("eruption.Data");
kurtosis(x);
skewness(x);