Thanks,

I did install the package and all works as expected. I have no idea why I thought gpclib has been merged with maptools :-)

mihai
 
Mihai Nica
405-562-7295

----- Original Message ----
From: Paul Hiemstra <p.hiemstra@geo.uu.nl>
To: Mihai Nica <mihainica@yahoo.com>
Cc: r-sig-geo@stat.math.ethz.ch
Sent: Sunday, December 2, 2007 3:36:55 AM
Subject: Re: [R-sig-Geo] unionSpatialPolygons


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@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







      ____________________________________________________________________________________



	[[alternative HTML version deleted]]


