[R] partitioning a space

Elena MOLTCHANOVA
2001-07-16T13:38:14Z

Hello, everybody!

I have subscribed to the list only recently, although I've been actively
using R since February. I found it very useful and very flexible and I hope
to learn to use it better. My current problem concerns spatial statistics.
I need to partition a regular rectangular grid into given number of
subsets. For example for a 5*5 grid with 3 subsets I could have:

1 1 1 2 2
1 1 2 2 2
1 1 1 2 3
1 1 1 1 3
1 1 3 3 3

One of the things I have to take into account here is the neighborhood
matrix. I consider two cells neighbors if they have a common size (not
corner). Thus each cell in the middle of the grid has four neighbors.

Is there by any chance a ready package or function which does it in R? The
packages I found so far are for point processes. Also can anybody propose a
good algorithm for doing this?

Thanks a lot


Elena MOLTCHANOVA
IIASA
International Institute for Applied Systems Analysis
A-2361 Laxenburg, Austria
E-Mail: moltchan at iiasa.ac.at
Phone : +43 2236 807-0
Fax   : +43 2236 71313

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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 at
stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._