How can a true intersection/clipping of polygons be done in R?
Problem description: Shapefile1 contains only one feautre without attributes (or - at least - attibutes don't matter). Shapefile2 contains several features, some of them fall entirely, some of the partly in the feature contained in Shapefile1. Other features fall totally outside.
I need to perform a true clip or intersection (just like in QGIS Vector > Geoprocessing Tools > Intersect). So far, the solution is described here. However, in addition to the cited I also DO need the clip to inherit attributes of Shapefile2.
At the end, the result needs to be exported to an ESRI Shapefile.
Any answer, suggestion is welcome!