Learn R Programming

geostatsp (version 0.4.4)

nn32: Nearest neighbour matrices

Description

Some large nearest neighbour matrices.

Usage

data(nn32)

Arguments

format

Sparse matrices produced by NNmat, showing the neighbours of cells on a 64 by 64 grid in nn64, a 128 by 128 grid in nn128, and 256 in nn256.

Examples

Run this code
data(nn32)
dim(nn32)
dim(nn64)
dim(nn128)
x = 50
y=31
matrix(nn128[,128*(y-1)+x], 128, 128)[ x+seq(-4,4),y+seq(-4, 4)]

length(nn128@x)

Run the code above in your browser using DataLab