get_neighbours: Get neighbours list from spatial objects

Description Usage Arguments Value

View source: R/map_coloring.R

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

1

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 documentation built on Jan. 20, 2021, 1:07 a.m.