Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NeighborDensities() should be 0 with a 1-row dataset #24

Open
maurolepore opened this issue Jul 13, 2018 · 3 comments
Open

NeighborDensities() should be 0 with a 1-row dataset #24

maurolepore opened this issue Jul 13, 2018 · 3 comments
Labels
bug Something isn't working feature

Comments

@maurolepore
Copy link
Contributor

Reproducible example of the issue.

@maurolepore
Copy link
Contributor Author

On Fri, Aug 10, 2018 at 8:07 AM Dan Johnson [email protected] 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
Copy link
Contributor Author

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 maurolepore changed the title NeighborDensities() should be 0 with a 1-row dataset, right? NeighborDensities() should be 0 with a 1-row dataset Oct 16, 2018
@maurolepore
Copy link
Contributor Author

Now the neighgbor features are in the branch neighbour.

@maurolepore maurolepore transferred this issue from another repository Dec 27, 2018
@maurolepore maurolepore added bug Something isn't working feature and removed wip labels Apr 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feature
Projects
None yet
Development

No branches or pull requests

1 participant