NeighborDensities() should be 0 with a 1-row dataset
maurolepore opened this issue · 3 comments
maurolepore commented
maurolepore commented
On Fri, Aug 10, 2018 at 8:07 AM Dan Johnson djj4tree@gmail.com wrote:
You are correct the function should return a zero value for both con and het.
There should be a line something like this in the code:
# only keep individuals that are with "radius" meters of the focal tree
neighb <- square[dist<=400 & square$tag!=focal.tag,]
maurolepore commented
I explored and tested neighbor_densities()
:
- The source code has lots of repetition that can be avoided relatively easy.
- The tests throw results that I don't expect. This is likely because the output corrects for edge effect. I need to rethink the output of tests considering edge effects. for example, even for
type = "count", the output is not directly a count but something like:
length(nn[consp]) * (pi * r^2 / area)`.
maurolepore commented
Now the neighgbor features are in the branch neighbour.