Skip to content

create an Hexagonal grid

4 messages · gianni lavaredo, Greg Snow, Breitbach, Nils +1 more

#
There is the hexbin package available through Bioconductor.  It uses grid graphics I believe.

If you want a base graphics solution, or just more hands on control (and using only CRAN packages), then check out the last example on the help page for the my.symbols function in the TeachingDemos package.
#
Dear Gianni,

a good reference is the book "Applied Spatia lData Analysis with R", where there is an example in the Chapter "6.4 Hexagonal Grids" on page 137. Try this example using the test data set "meuse":
More details in the above mentioned (very helpful) book. According to the book, there are no classes for hexagonal grids but some useful funtions to generate and plot them.

Good luck!

Nils
#
On Wed, 15 Sep 2010, Greg Snow wrote:

            
For sp objects, see the "hexagonal" type in spsample(), the low-level 
sp:::genHexGrid(), and HexPoints2SpatialPolygons():

hpts <- sp:::genHexGrid(dx=0.1, ll=c(0, 0), ur=c(1, 1))
pols <- HexPoints2SpatialPolygons(SpatialPoints(hpts))
plot(pols)

Hope this helps,

Roger