Learn R Programming

geostatsp (version 1.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
# NOT RUN {
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)

# }
# NOT RUN {
nn32 = NNmat(32)
nn64 = NNmat(64)
nn128 = NNmat(128)
#save(nn32,nn64,nn128, file=
"/home/patrick/workspace/diseasemapping/pkg/geostatsp/data/nn32.RData",
compress='xz')
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab