[R-sig-Geo] adding ids and df to hexagonal polys ?
Horacio Samaniego
horacio.samaniego at gmail.com
Thu Sep 10 05:56:04 CEST 2009
Hi,
I am trying to understand the different data types in the sp package.
However, I do not seem to get the way that spdf are built.
For example, let say that I can build a hexagonal grid. That work just
fine using
> regio <- readShapePoly("regions.shp")
> hpts <- spsample(regio,type="hexagonal",cells=30000)
> hpoly = HexPoints2SpatialPolygons(hpts)
I'm unclear about adding a df with IDs to this new SpetialPolygons class
I guess that I'm not understanding how ids are assigned... any hint
would be appreciated
thanks
More information about the R-sig-Geo
mailing list