machinists
mean(with(machinists, rep(accidents, times = ofreq)))
var(with(machinists, rep(accidents, times = ofreq)))
## Not run: barplot(with(machinists, ofreq),
# names.arg = as.character(with(machinists, accidents)),
# main = "Machinists accidents",
# col = "lightblue", las = 1,
# ylab = "Frequency", xlab = "accidents") ## End(Not run)
Run the code above in your browser using DataLab