Dear list members:
In S-Plus Spatial, I would like to create a spatial.neighbor object
for a regular hexagonal lattice.
I experimented with the commands that produced a 10 by 10 lattice as follows:
ngr <- 10
neighbor.grid(ngr,ngr,neighbor.type="hexagonal.in")
When I examined the number of neighbors of a particular interior
site I found that there were 8 neighbors instead of the expected 6.
For example site 12 appears with 8 neighbors as follows
( I have removed duplicates)
row.id col.id weights matrix
....
33 12 1 1 1
34 12 2 1 1
35 12 3 1 1
36 12 11 1 1
37 12 13 1 1
38 12 22 1 1
86 21 12 1 1
95 23 12 1 1
My questions:
What is "hexagonal.in" supposed to produce?
Is there an S-library that has commands to compute the contiguity (neighbor)
information for regular hexagonal, triangular, and other regular lattices?
Is there an S-library with commands that draw the Voronoi polygons for
a set of spatial point locations?
Thanks,
Ernst.
I use S-Plus 6.2 on Windows XP.
--
****************************************************************
Ernst Linder elinder@math.unh.edu
Department of Mathematics and Statistics 603 - 862- 2687
University of New Hampshire Fax: 603 - 862 - 4096
Durham, NH 03824 www.math.unh.edu/~elinder
****************************************************************
|