- polygons
An object of class sf containing polygon geometries.
- points
A data.frame containing point coordinates and the value to
summarise.
- value
A string giving the name of the numeric column in points
to summarise.
- fun
A summary function, such as sum, mean, or
length. Default is sum.
- lon
A string with the name of the longitude column in points.
Default is "lon".
- lat
A string with the name of the latitude column in points.
Default is "lat".
- crs
Coordinate reference system of the point coordinates. Default is
4326.
- output_col
Optional string giving the name of the output column. If
NULL, the name is created from value and fun, for
example "amount_sum" or "amount_mean".
- na.rm
Logical. Whether to remove missing values when fun
supports an na.rm argument. Default is TRUE.
- outside
What to do when points fall outside all polygons:
"message" (default), "warning", or "ignore".
- repair_geometry
Logical. Whether to try sf::st_buffer(x, 0)
if transforming polygon geometries fails. Default is TRUE.