Mark Heckmann
2010-Jan-21 16:21 UTC
[R] sp package - How to join two or more polygons from a SpatialPolygonsDataFrames
I have a SpatialPolygonsDataFrame object (sp package).
It contains 40 polygons.
Now I want to join some of the polygones.
I cannot figure out how to do that? Any ideas?
The code below produces a map of Germany and I need to join some
counties.
library(sp)
library(RColorBrewer)
# get spatial data for Germany on county level
con <- url("http://gadm.org/data/rda/DEU_adm3.RData")
print(load(con))
close(con)
# plot Germany with random colors
col = rainbow(length(levels(gadm$NAME_3)))
spplot(gadm, "NAME_3", col.regions=col, main="German
Regions",
colorkey = FALSE, lwd=.4, col="white")
???????????????????????????????????????
Mark Heckmann
Dipl. Wirt.-Ing. cand. Psych.
Vorstra?e 93 B01
28359 Bremen
Blog: www.markheckmann.de
R-Blog: http://ryouready.wordpress.com
Seemingly Similar Threads
- Flattening lists and environments (was: "how to flatten a list to the same level?")
- changing a list element's name during execution in lapply - possible?
- gWidgets / RGtk2 - how to change a handler from a toolbar?
- how to flatten a list to the same level?
- modifying the dots argument - how?
