powered by
Filter all observations in a data.frame that fall within a circle of a specified radius drawn around a given latitude and longitude point.
points_in_circle_vec( data, lon_center, lat_center, lon = lon, lat = lat, radius = 200 )
A subset of the input data.frame containing only the observations that fall within the specified circle.
data.frame with at least columns for longitude and latitude.
numeric. Representing the longitude of the circle's center.
numeric. Representing the latitude of the circle's center.
column name in data containing longitudes (default is lon).
data
lon
column name in data containing latitudes (default is lat).
lat
radius of the circle in meters (default is 200m).
Martin Haringa
points_in_circle_vec(Groningen, lon_center = c(6.571561, 6.56561), lat_center = c(53.21326, 53.20326), radius = 60)
Run the code above in your browser using DataLab