par(mfrow=c(2,2))
x0 <- rnorm(1000,34.5,1.5)
hist(x0)
x <- round(x0)
(out1 <- histogram(x, rounding='nearest',digits=0))
out2 <- histosmooth(out1)
plot(out1)
lines(out2, col=2)
out3 <- histosmooth(out1, type='lp')
plot(out1)
lines(out3, col=2)
out4 <- histosmooth(out1, type='kde')
plot(out1)
lines(out4, col=2)
Run the code above in your browser using DataLab