Dear all,

I am trying to manipulate a shape.file using the function
unionSpatialPolygons. It is weird but the example, given by the R-CRAN, is
not working, and I do not know how to solve the problem. Any help will be
appreciated.

Example given by the library maptools:

library(sp)              * ## I discovered that you need to load the
library spdep, otherwise you do not read the shape.file NorthCaroline*

library(gpclib)

nc1 <- readShapePoly(system.file("shapes/sids.shp",
package="maptools")[1], proj4string=CRS("+proj=longlat +datum=NAD27"))

lps <- coordinates(nc1)

ID <- cut(lps[,1], quantile(lps[,1]), include.lowest=TRUE)

reg4 <- unionSpatialPolygons(nc1, ID)            *## Here I get the
following error mensage:* *"Error: isTRUE(gpclibPermitStatus()) is not
TRUE"*

sapply(slot(reg4, "polygons"), function(i) slot(i, "ID"))

Everton.

-- 
Doctor and Research Scientist at the Centro de Desenvolvimento e
Planejamento Regional-UFMG.
Doutor e Pesquisador do Centro de Desenvolvimento e Planejamento
Regional-UFMG.
Doctor en onderzoeker van de Centro de Desenvolvimento e Planejamento
Regional-UFMG.

	[[alternative HTML version deleted]]

