| GeoId {endorse} | R Documentation |
Getting Indices of Incidents around a specified point
Description
This function obtains the indices of incidents within a specified distance around a specified point.
Usage
GeoId(x, y, distance, x.latitude = "latitude",
x.longitude = "longitude", y.latitude = "latitude",
y.longitude = "longitude")
Arguments
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 |
Value
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.
Author(s)
Yuki Shiraito, Department of Political Science, University of Michigan shiraito@umich.edu.