remove_points_polygon {glossa} | R Documentation |
Remove Points Inside or Outside a Polygon
Description
This function removes points from a dataframe based on their location relative to a specified polygon.
Usage
remove_points_polygon(
df,
polygon,
overlapping = FALSE,
coords = c("decimalLongitude", "decimalLatitude")
)
Arguments
df |
A dataframe object with rows representing points. |
polygon |
An sf polygon object defining the region for point removal. |
overlapping |
Logical indicating whether points overlapping the polygon should be removed (TRUE) or kept (FALSE). |
coords |
Character vector specifying the column names for longitude and latitude. Default is c("decimalLongitude", "decimalLatitude"). |
Value
A dataframe containing the filtered points.
[Package glossa version 1.2.2 Index]