Open
Description
When running poly2nb on a sf spatial dataframe I get regions with no links. I'm using this neighbours list to create matrix for an INLA spatial model, which as I understand it requires no regions with no links. Is there a way to automatically drop those regions with no links/ extract them list to a different variables?
I'm imagine the solution to look something like:
nb <- poly2nb(polygons)
nb$no_links # to display those regions with no links so I can iterate and remove them
or
nb <- poly2nb(polygons, force_no_links = TRUE) # some parameter which does the above automatically, default to FALSE
Is this possible? Please let me know if you need more information.
Metadata
Metadata
Assignees
Labels
No labels