Skip to content
Back to formatted view

Raw Message

Message-ID: <CALBE=tqkRHAqSiTsugHymMK72wnoWzNHX=P8Fogu10GwosdSqw@mail.gmail.com>
Date: 2014-11-07T11:53:09Z
From: monica abrudan
Subject: neighbourhood in a grid

Dear all,

I have a squared, toroidal grid populated by individuals of different types
(number of types=n). All cells of the grid are populated. A simplified
version of my grid, with dimensions 6x3 and n=4, looks like this
[1 1 1 1 2 3;
 1 3 2 1 1 1;
 1  1 1 4 1 1]

I want to check whether a type has a preference for any other type, that
is, is it more likely that a type i is neighbouring type j, than it is
neighbouring type k? In my example, type 3 is preferring more type 2 than
it is preferring type 4.

Is there a function or package in R that would deal with this problem? Or
could you suggest an algorithm for solving this problem? Thank you

Monica

	[[alternative HTML version deleted]]