RStudio addin to quickly add manual connections to spdep::poly2nb() neighbour lists based on an sf object in your current R environment.
[!WARNING] This add-in was mostly vibe-coded because I needed it myself. Use at your own risk.
You can install the development version of {sfneighbourconnector} like so:
# remotes::install_github("vankesteren/sfneighbourconnector")
install.packages("sfneighbourconnector", repos = c('https://vankesteren.r-universe.dev', 'https://cloud.r-project.org'))
Then, restart your RStudio. The add-in should now be available in the addins dropdown.
library(sf)
my_sf <- st_read("https://nlgis.nl/api/maps?year=1869")
Then select the add-in. Be patient, initial loading can take some time!
