Clipping (Subsetting) a point layer over a polygon layer

Nice tutorials by Robin Lovelace on Clipping

‘This miniature vignette shows how to clip spatial data based on different spatial objects in R and a ‘bounding box’. Spatial overlays are common in GIS applications and R users are fortunate that the clipping and spatial subsetting functions are mature and fairly fast. We’ll also write a new function called gClip(), that will make clipping by bounding boxes easier.’

mapply in R – an example

mapply() looks like an interesting function in R. here an example of what you can do with mapply() function

The results are :