Skip to content

Srings

2 messages · Denis Chabot, Roger Bivand

#
Hi Roger,

I don't know what is happening, maybe a mismatch of some packages  
from my R2.1 (old) install and my new R2.2 install, but I'm having  
problems with function

asSpatialRingsShapes

that was used in the method you developed to import shapefiles into  
files that are compatible with PBSmapping. The problem is not with  
the functions you wrote for me, actually, but with a function that is  
part of maptools. This is actually part of the example given in the  
help file for asSpatialRingsShapes. R chokes on Sring:

 > library(maptools)
 > nc.shp <- read.shape(system.file("shapes/sids.shp",  
package="maptools")[1])
Shapefile type: Polygon, (5), # of Shapes: 100
 > nc1 <- asSpatialRingsShapes(nc.shp$Shapes, as.character(nc.shp 
$att.data$FIPS))
Erreur : impossible de trouver la fonction "Sring"


Do others have problems with this function?

Sincerely,

Denis
#
On Mon, 17 Oct 2005, Denis Chabot wrote:

            
The name changed with a major improvement in the internal structure: the 
classes are (were/are) Sring|Polygon, Srings|Polygons, etc. Recent 
releases of maptools (since 0.5) depend on sp, and readShapePoly() now 
imports a shapefile into a SpatialPolygonsDataFrame object directly. We 
did announce the change, and the posting is available at:

http://r-spatial.sourceforge.net/changes081.txt
where we also wrote:
"Following very useful input from users, a number of incompatible changes 
are being introduced into sp from release 0.8-*. We hope that users will 
export data objects in the deprecated formats before updating."

Older versions of sp are available from the CRAN archive if needed.

Hope this helps,

Roger