I have carried out a spatial join in R in order to join a points shapefile to the corresponding polygon in a polygon shapefile using over() from the sp package and spCbind().
join <- over(polygons, points)
join <- spCbind(polygons, join)
However, some of the polygons have multiple corresponding points. Using this method, only one of these corresponding points is maintained in the joined dataset.
Is there a method for carrying out this task that will keep the data of all of the corresponding points for each polygon in the resulting dataset?
I would prefer an R solution if possible but I can also use QGIS or ArcGIS if they have tools to solve this.