[R-sig-eco] neighbourhood in a grid

monica abrudan monica.abrudan at gmail.com
Fri Nov 7 12:53:09 CET 2014


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]]



More information about the R-sig-ecology mailing list