powered by
The generic function NemptyHood gives a free space which is present in the Moore neighbourhood of an individual of interest.
NemptyHood
NemptyHood(object, pos, n, m, x, y, occupyM, inverse = FALSE)# S4 method for Organism NemptyHood(object, pos, n, m, x, y, occupyM, inverse = FALSE)
# S4 method for Organism NemptyHood(object, pos, n, m, x, y, occupyM, inverse = FALSE)
An object of class Organisms.
A dataframe with all occupied x and y positions
A number giving the horizontal size of the environment.
A number giving the vertical size of the environment.
A number giving the x position of the individual of interest in its environment.
A number giving the y position of the individual of interest in its environment.
A matrix indicating grid cells that are obstacles
Return occupied positions instead
Returns the free position in the Moore neighbourhood, which is not occupied by other individuals. If there is no free space NULL is returned.
NULL
Organism-class
# NOT RUN { NULL # }
Run the code above in your browser using DataLab