Skip to content
Prev 1474 / 29559 Next

Best way to merge selected regions in a map?

On Fri, 10 Nov 2006, Frosch, Katharina wrote:

            
Please include some of the commands you have used. In principle 
unionSpatialPolygons() should work, given that the classifying factor has 

length(unique(factor)) < length(factor)

and the boundaries of the polygons are the same. If the boundaries are 
separated, for example by a river, the output Polygons object will be 
joined, but will be represented by two distinct Polygon objects.

So there are two possible reasons for the dissolve not working.

More advice on the arguments to the function will be easier to give if you 
paste the ones you used into your posting.

Roger