x <- rdnorm(1e5,0,3)xx <--15:15plot(prop.table(table(x)))lines(xx, ddnorm(xx,0,3), col ="red")hist(pdnorm(x,0,3))plot(ecdf(x))xx <- seq(-15,15,0.1)lines(xx, pdnorm(xx,0,3), col ="red", lwd =2, type ="s")
References
Roy, D. (2003). The discrete normal distribution. Communications in Statistics-Theory and Methods, 32, 1871-1883.