[R] regularly lattice & neighbors

About this list Date view Thread view Subject view Author view Other groups

Subject: [R] regularly lattice & neighbors
From: Alvaro A. Novo (novo@uiuc.edu)
Date: Thu 30 Mar 2000 - 09:12:06 EST


Message-Id: <00032917242302.01363@friedman>

Dear R-users,

Is there a procedure to identify neighbors in a regular lattice using either a
"rook" or a "queen" criterium? To be more specific, suppose:

My lattice:

1 2 3
4 5 6
7 8 9

"Rook" Neighbors

1 has neighbors 2,4
2 has neighbors 1,3,5
...
5 has neighbors 2,4,6,8

"Queen Neighbors"

1 has neighbors 2,4,5
2 has neighbors 1,3,4,5,6

For each case, the final output would be a 9x9 matrix with 0's and 1's.

I have access to a software that does this for me, but it would be nice to
avoid importing such matrices.

Thank you for your help,

Alvaro Novo
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b25 : Mon 17 Jul 2000 - 12:33:13 EST