# NOT RUN {
n <- rnorm(100, mean=10, sd=2)
breaks <- 0:20
hist(n, breaks=breaks)
s <- modeled.hist(breaks=breaks, FUN=pnorm, mean=10, sd=2, sum=100)
points(s$x, s$y, pch=19)
lines(s$x, s$y)
n <- rlnorm(100, meanlog=2, sdlog=0.4)
b <- hist(n, ylim=c(0, 70))
s <- modeled.hist(breaks=b$breaks, FUN=plnorm, meanlog=2, sdlog=0.4, sum=100)
points(s$x, s$y, pch=19)
lines(s$x, s$y)
# }
Run the code above in your browser using DataLab