rgeospatialadehabitathr

First Passage Time analysis in adehabitatLT returns only NA


Background: I try to do a First Passage Time Analysis in R using adehabitatLT. I found a good tutorial here and I can follow all the steps using my own data set up to the section with First passage Time analysis.

Problem: When I use the fpt() command i get a strange result where all the produced lists are filled with NA (except the list of my custom defined radii, where i tested the same values as the example, as well as larger ranges to see if that was the cause of the problem).

My efforts: I can successfully perform the analysis using the example data provided in the tutorial, so I have tried to compare my own data set with the ones provided in that example. I haven't been able to find any crucial differences. I have tried different radii and units in the fpt()-command. I have also performed the analysis on different subsets of my dataset, with the same result.

Unfortunately I cannot provide you with a workable example as my data is recorded from a protected species. So my question cannot be more specific than to ask if there are any more diagnostics I could run to detect potential causes of the problem. Or if there are any common mistakes that I might have run into.


Solution

  • It turned out the problem was due to the projection used (found out thanks to this post). I had positions in decimal latitude/longitude, and the radii I defined turned out to be in degrees rather than meter (since a degree at the equator is 11.32 km, I got sensible results if i divided my radii with 11320).

    Converting to a UTM projection solved the problem.

    I leave the question as a reference is somebody else make the same mistake.