Skip to contents

Spatial weights from a neighbour matrix

Usage

morie_spatial_weights(neighbors, style = c("W", "B"))

Arguments

neighbors

A binary neighbour matrix.

style

"W" (row-standardised) or "B" (binary).

Value

A weights matrix.

Examples

morie_spatial_weights(matrix(c(0,1,1,0), 2))
#>      [,1] [,2]
#> [1,]    0    1
#> [2,]    1    0