[R-sig-Geo] merging polygons by indices
majesty
juta.kawalerowicz at stx.ox.ac.uk
Tue Aug 16 17:17:01 CEST 2011
Dear R-sig-geo subscribers,
I have the following problem, would be grateful for suggestions. I am doing
a research on UK output areas, My .shp file contains output areas for UK but
there are some duplicates. when I type
which(duplicated(shape$output_area)==TRUE) I get indices of 67 duplicates:
[1] 165713 165723 165724 165786 165788 165814 165815 165819 165820 165821
[11] 165822 165827 165900 165974 165978 165985 165989 166132 166142 166300
... and so on
I would like to merge them with the output area polygons of the first
original instance of a given output_area, so that for instance I would merge
16712 with 165713 and 165722 with 165723, etc.
I know I should use unionSpatialPolygons() function from maptools but how to
do it if I want to merge only particular indices (of which I have a list)?
Any input would be appreciated,
Thanks,
Juta
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/merging-polygons-by-indices-tp6691746p6691746.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
More information about the R-sig-Geo
mailing list