Learn R Programming

DRHotNet (version 2.3)

NeighbourhoodMatrixNetwork: Creates the neighbourhood structure of a linear network

Description

Given a linear network structure, this function creates the neighbourhood matrix ("queen" criterion) associated to it. Two segments of the network are neighbours if they share a vertex

Usage

NeighbourhoodMatrixNetwork(network)

Value

Returns a listw object in "W" style

Arguments

network

- A linnet object representing a linear network structure

Examples

Run this code
library(DRHotNet)
library(spatstat.geom)
library(spatstat.linnet)
library(spdep)
library(raster)
chicago_neighbourhood <- NeighbourhoodMatrixNetwork(chicago$domain)
class(chicago_neighbourhood)
chicago_neighbourhood$neighbours[[1]]

Run the code above in your browser using DataLab