An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20071201/d317a426/attachment.pl>
unionSpatialPolygons
2 messages · Mihai Nica, Paul Hiemstra
Dear Mihai, You need to install the gpclib package (available from CRAN). The error occurs because it tries to use a function from that package while it is not installed. cheers, Paul
Mihai Nica wrote:
XP, R and Tinn-R up to date.
Greetings:
I've been away from the list for quite some time, and (as expected) some things change. My understanding is that maptools contains "unionSpatialPolygons". However, the following code (which previously worked):
#______________________________________________________________
library(maptools)
msa_cmsa <- readShapePoly("1999_MSA_CMSA") # puts shapefile in SpatialPolygonsDataFrame
summary(msa_cmsa)
msa_cmsaaggregated=unionSpatialPolygons(msa_cmsa, msa_cmsa$MSACMSA)
#_______________________________________________________________
leads to:
msa_cmsaaggregated=unionSpatialPolygons(msa_cmsa, msa_cmsa$MSACMSA)
Loading required package: gpclib Error in as(pli[[1]], "gpc.poly") : no method or default for coercing "matrix" to "gpc.poly" In addition: Warning message: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called 'gpclib' May I ask for a hint? thanks, mihai
____________________________________________________________________________________ Be a better pen pal. [[alternative HTML version deleted]] _______________________________________________ R-sig-Geo mailing list R-sig-Geo at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Drs. Paul Hiemstra Department of Physical Geography Faculty of Geosciences University of Utrecht Heidelberglaan 2 P.O. Box 80.115 3508 TC Utrecht Phone: +31302535773 Fax: +31302531145 http://intamap.geo.uu.nl/~paul