if (FALSE) {
## load packages
library(dplyr)
library(duckspatial)
library(sf)
## read countries data, and rivers
countries_sf <- read_sf(system.file("spatial/countries.geojson", package = "duckspatial"))
countries_filter_sf <- countries_sf |> filter(CNTR_ID %in% c("PT", "ES", "FR", "IT"))
## check countries within 1 degree of distance
ddbs_is_within_distance(countries_filter_sf, countries_sf, 1)
}
Run the code above in your browser using DataLab