By Allan Roberts
One of the things that makes the stats and graphics application R so flexible is that there are lots of extension packages, or libraries, available. Some of these come with R by default, and others are available from the R Project website. The image in Figure 1 was made by using a function in the “png” library to read a .png image of the Madreporite logo into R. I used the “grid” library to create a view port for each tile. Then I used a modified version of the script posted in the Sliding Tile Game with R post to scramble the tiles.
Urbanek, S., 2011. png: Read and write PNG images. R package
version 0.1-4. http://CRAN.R-project.org/package=png
R Core Team (2012). R: A language and environment for statistical computing. R
Foundation for Statistical Computing, Vienna, Austria. http://www.R-project.org/