I'm working with rgdal, sp, maptools, etc.

I have a SpatialPolygonsDataFrame that has each row/Polygons list with only one Polygon. It also has an identifier column which I want to use to group by, and other attribute columns.

I would like to get the equivalent of group_by, where the attribute columns are aggregated, but where the corresponding Polygons' Polygon are concatenated in the same list.

Is there a function to do this?

| improve this question | | | | |
  • raster::aggregate does approximately that – Loïc Dutrieux Jul 18 '17 at 17:35
  • Thank you. It indeed does. Embarassed for having missed it. – Diego Jul 18 '17 at 18:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.