Sampling design combinatorics

January 14, 2014

(This article was first published on theoretical ecology » Submitted to R-bloggers, and kindly contributed to R-bloggers)

A colleague had a question about sampling design and we didn’t find a good answer … so, if you like to solve riddles, you might like that one:

We want to distribute n=3 plant species across k=12 x m=12 grid cells, in a way that no individual has another individual of it’s own species in its 4-cell (von Neumann: up, down, left, right) neighborhood. Here is an example that is created by shifting around the species by hand.


Now, we want to have a defensible design, so we want an algorithm that creates a non-symmetric, ideally random pattern of the three species that is still balanced in species numbers and ideally also in the neighborhood conditions, i.e. species 1,2,3 have the same abundance, and neighborhood combinations that are allowed for species 1,2,3 appear with the same frequency. Any idea how to do this?

To leave a comment for the author, please follow the link and comment on their blog: theoretical ecology » Submitted to R-bloggers. 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...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)