Partitions a dataset according to the location area each observation belongs to.

geopart(dataset, shape_file)

Arguments

dataset

A data.frame or matrix object containing lon/lat coordinates

shape_file

A SpatialPolygonsDataFrame object created using sp package