(This article was first published on

**Gregor Gorjanc (gg)**, and kindly contributed to R-bloggers)Andrej Blejec has a very nice R demo of Galton’s quincunx (link1, link2). It is a bit tedious to copy the code from PDF to R console, but it is worth the effort as the demo simulation clearly shows the nature of quincunx. After a bit of search I also found a similar function quincunx in the animation R package by Yihui Xi.

Image source: Wolfram MathWorld

To

**leave a comment**for the author, please follow the link and comment on their blog:**Gregor Gorjanc (gg)**.R-bloggers.com offers

**daily e-mail updates**about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...