lpossums
(samplemean <- with(lpossums, weighted.mean(number, ofreq)))
with(lpossums, var(rep(number, times = ofreq)) / samplemean)
sum(with(lpossums, ofreq))
if (FALSE) spikeplot(with(lpossums, rep(number, times = ofreq)),
main = "Leadbeater's possums", col = "blue", xlab = "Number")
Run the code above in your browser using DataLab