Deprecated.
`points_in_circle()` was renamed to [points_within_radius()].
This function selects rows from a data frame whose longitude/latitude coordinates fall within a given radius (in meters) from one or more specified center points. It also calculates the distance of each point to the center.
points_in_circle(
data,
lon_center,
lat_center,
lon = lon,
lat = lat,
radius = 200,
sort = TRUE
)points_within_radius(
data,
lon_center,
lat_center,
lon = "lon",
lat = "lat",
radius = 200,
sort = TRUE
)
A data frame subset of `data` with an extra column `distance_m` and if multiple centers are provided, also a column `center_index`.
A data frame containing at least longitude and latitude columns.
Numeric scalar or vector, longitude(s) of the circle center(s).
Numeric scalar or vector, latitude(s) of the circle center(s).
A string with the name of the longitude column in `data`.
A string with the name of the latitude column in `data`.
Numeric, circle radius in meters. Default is 200.
Logical, if `TRUE` results are sorted by distance within each center.