This function obtains the indices of incidents within a specified distance around a specified point.
GeoId(x, y, distance, x.latitude = "latitude", x.longitude = "longitude", y.latitude = "latitude", y.longitude = "longitude")
x | data frame containing the longitude and the latitude of a point. |
---|---|
y | data frame containing the longitude and the latitude of incidents. |
distance | numeric. The distance from villages in kilometers. |
x.latitude | character. The variable name for the latitude in |
x.longitude | character. The variable name for the longitude in |
y.latitude | character. The variable name for the latitude in |
y.longitude | character. The variable name for the longitude in |
A vector containing the indices of y
that are within
distance
kilometers around the point specified by x
. If
there are multiple observations in x
, the first row is used as
the point.