Skip to content

dht2() incorrectly handling binned distances with truncation #175

@erex

Description

@erex

Email from user:

I'm having a few problems calculating density/abundance using dht2 and flatfiles that I have never had before.
dht2 doesn't seem to be choosing the right observations based on truncation distance. In the screenshot attached, it shows that there are six observations being used, but there are 7 in the file and only 5 are within the truncation distance (2km).
Additionally, in some other cases, I get this error:
Error in $<-.data.frame(*tmp*, "distance", value = 0.0709) : replacement has 1 row, data has 0
The distance value 0.0709 is specified as the left truncation distance in the detection function - but there are never detections at exactly that distance so I don't know why this error would show up in only some instances.

I'm not sure how much testing dht2 has received when using binned data with truncation.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions