Skip to content

problem with csr {splancs}

2 messages · António M. Rodrigues, Roger Bivand

#
On Wed, 4 May 2011, Ant?nio M. Rodrigues wrote:

            
?csr perhaps? "poly: A polygon data set", not a SpatialPolygons object. If 
you do:

data(bodmin)
str(bodmin$poly)

you see that splancs, which is effectively unchanged since written almost 
20 years ago, needs a two-column matrix. In your case, if poly1 is a 
SpatialPolygons object with a single Polygons object, which in turn has a 
single member Polygon object, the polygon for splancs would be:

poly1pl <- slot(slot(slot(poly1, "polygons")[[1]], "Polygons")[[1]],
   "coords")

Perhaps we should start planning for a birthday party for splancs, one of 
the real achievements in S/R and spatial statistics!

Roger