**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?

**leave a comment**for the author, please follow the link and comment on their blog:

**theoretical ecology » Submitted to R-bloggers**.

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...