[R-sig-Geo] create an Hexagonal grid
Roger Bivand
Roger.Bivand at nhh.no
Wed Sep 15 18:45:36 CEST 2010
On Wed, 15 Sep 2010, Greg Snow wrote:
> 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.
>
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
>
--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no
More information about the R-sig-Geo
mailing list