Neighmat: Create Neighborhood Matrix from Adjacency List

Description Usage Arguments Value Author(s)

View source: R/Neighmat.r

Description

Create Neighborhood Matrix from Adjacency List

Usage

1
Neighmat(adj, num, n)

Arguments

adj

adjacency list, as created by poly2nb fron spdep package

num

the number of adjacent neighbors for each list item above

n

total number of list items

Value

a matrix, with 1's indicating neighbors, and 0 otherwise, in the same order as adj.

Author(s)

Jay Ver Hoef


jayverhoef/SpAReco documentation built on May 18, 2019, 5:58 p.m.