Compare Adjacency Lists
compare_adjacencies(adj1, adj2, shp, zero = TRUE)
tibble with row indices to compare, and optionally columns which describe the DE-9IM relationship between differences.
data(towns)
rook <- adjacency(towns)
sf_rook <- lapply(sf::st_relate(towns, pattern = 'F***1****'), function(x) {
x - 1L
})
#> although coordinates are longitude/latitude, st_relate_pattern assumes that
#> they are planar
compare_adjacencies(rook, sf_rook, zero = FALSE)
#> # A tibble: 0 × 5
#> # ℹ 5 variables: x <int>, y <dbl>, from <dbl>, relation <chr>, class <chr>