#Normality tests
#Stem and leaf plots;

#install.packages('graphics')
library(graphics)
stem(Wk04$Temp)
## 
## The decimal point is 1 digit(s) to the right of the |
##
## 5 | 3
## 5 | 89999
## 6 | 00111233334444
## 6 | 5555556666777788888999
## 7 | 00011111111111122222222222223333333333333333333344444444
## 7 | 55555555555566666666667777777777778888888888888888888888999999999999
## 8 | 00000000000000000111111111111122222222222222222233333333333344444444+1
## 8 | 55555555555555666666666666666777777788888888888888889999
## 9 | 00000000001111111111111222222233333344444
## 9 | 5555567788
## 10 | 0233

#normality QQPlot is comprised of two lines; the first to plot data and the second to 
#impose normal reference line
#X and Y axis are transposed relative to SPSS, but interpretation is the same.

qqnorm(Wk04$Temp, pch = 1, frame = FALSE)
qqline(Wk04$Temp, col = "steelblue", lwd = 2)


#Boxplot; here I define the whisker ends (following SPSS) as 1.5x the interquartile distance

boxplot(Wk04c$Temp, range = 1.5)