Get local density
get_local_density.Rd
Gets the number of individuals within a radius R
of a focal individual i
at each time point
Arguments
- xs
N x n_times
matrix giving x positions of allN
individuals overn_times
timesteps- ys
N x n.times
matrix giving y positions of allN
individuals overn_times
timesteps- i
the focal individual (for whom the local density will be computed)
- R
the radius over which to compute the local density (in same units as
xs
andys
)