[R-sig-Geo] unionSpatialPolygons
Paul Hiemstra
p.hiemstra at geo.uu.nl
Sun Dec 2 10:36:55 CET 2007
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
More information about the R-sig-Geo
mailing list