Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

get_neighbours

Get neighbours list from spatial objects


Description

Get neighbours list from spatial objects. The output is similar to the function poly2nb of the spdep package, but uses sf instead of sp.

Usage

get_neighbours(x)

Arguments

x

a shape object, i.e., a sf object or a SpatialPolygons(DataFrame) (sp package).

Value

A list where the items correspond to the features. Each item is a vector of neighbours.


tmaptools

Thematic Map Tools

v3.1-1
GPL-3
Authors
Martijn Tennekes [aut, cre]
Initial release
2021-01-19

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.