R How do I merge polygon features in a shapefile with many polygons? (reproducible code example)
问题 How do I merge polygon features in a shapefile with many polygons? rbind and union just combine the rows of the shapefile features, they don't actually merge the polygons themselves. Desired result in example below: How do I get the below shapefile with duplicated ID_2 to merge to a single polygon in sptemp? Example below of GADM level 2 of Ethiopia has first two rows of the shapefile ID_2 column duplicated (value=1). I'd like sptemp with 79 features combining the first two rows that are the