mst.nb: Function to compute neighborhood based on the minimum...

Description Usage Arguments Value Author(s) See Also Examples

Description

Returns an object of the class nb (see spdep package).

Usage

1
mst.nb(dxy)

Arguments

dxy

A distance matrix based on spatial coordinates of samples

Value

An object of the class nb.

Author(s)

Stephane Dray

See Also

tri2nb, graph2nb, give.thresh

Examples

1
2
3
4
5
6
7
8
9
xy <- matrix(rnorm(60),30,2)
dxy <- dist(xy)
th <- give.thresh(dxy)
nb1 <- mst.nb(dxy)
nb1
wh1 <- which(as.matrix(dxy)==th,arr.ind=TRUE)
plot(nb1,xy,pch=20,cex=2,lty=3)
lines(xy[wh1[1,],1],xy[wh1[1,],2],lwd=2)
title(main="Maximum distance of the minimum spanning tree in bold")

spacemakeR documentation built on May 31, 2017, 2:24 a.m.