data(ethylene)
implants <- tapply(ethylene$impl, FUN=mean, INDEX=ethylene$id)
summary(implants)
m <- mean(implants)
v <- var(implants)
hist(implants, main=paste("Histogram of the number of implants (Mean = ",
round(m,2), ", Var = ", round(v,2),")"))
Run the code above in your browser using DataLab