# Clear console
cat(" \0 14" )
(5 / 9 )* (52.7 - 32 )
2 ^ 3
2 ** 3
pi * 6 ^ 2
log10(1000 )
log(3.8 )
exp(1.335 )
Molar <- c(2.6 ,7.2 ,2.9 ,6.7 ,4.8 ,3.8 ,5.3 ,5.1 ,
+ 7.9 ,7.3 ,3.7 ,8.9 ,8.4 ,6 ,5.2 ,9.6 ,4.5 ,4.8 ,7.3 ,
+ 4.8 ,3.3 ,6.8 ,4.5 ,8.6 )
summary(Molar )
par(mai = c(1.3 ,1.5 ,1 ,1 ))
hist(Molar ,
breaks = seq(2.5 ,10.5 ,by = 1 ),
xlab = " Length in mm" ,
main = " Molar length of 24 Acropithecus rigidus" ,
cex.main = 3 ,cex.axis = 2.7 ,cex.lab = 2.7 )
Creating a frequency distribution table
# Clear console
cat(" \0 14" )
# Frequency table
f.breaks <- factor (cut(Molar , breaks = seq(2.5 ,10.5 ,by = 1 )))
f.table <- as.data.frame(table(f.breaks ))
f.table <- transform(f.table , relative = round(prop.table(Freq ),3 ))
f.table
# Clear console
cat(" \0 14" )
# Fan plot
counts <- c(3 ,4 ,6 ,1 ,5 ,2 ,2 ,1 )
sum <- sum(counts )
rf <- counts / sum
round(rf ,3 )
slice <- c(" [2.5-3.5]" , " (3.5-4.5]" , " (4.5-5.5]" , " (5.5-6.5]" , " (6.5-7.5]" , " (7.5-8.5]" , " (8.5-9.5]" , " (9.5-10.5]" )
pct <- round(counts / sum * 100 ,1 )
crust <- paste(slice ," :" ,pct ," %" ,sep = " " )
par(mai = c(1.2 ,1.5 ,1 ,0.3 ))
fan.plot(counts ,labels = crust ,label.radius = c(1.15 ,1.1 ,1.1 ,1.1 ,1.1 ,1.1 ,1.1 ,1.1 ),main = " Molar Length of 24 Acropithecus rigidus in mm" )