jedalong / wildlifeTG

R Package for Time Geographic Analysis of Wildlife Tracking Data
6 stars 0 forks source link

Error in esttheta and RSPud for multiple individuals #3

Open TeresaGM opened 4 years ago

TeresaGM commented 4 years ago

Hello,

I am trying to run the functions esttheta and RSPud with a trajectory file (ltraj) for multiple individuals, and I get the same error in both functions:

theta <-esttheta(traj=lt,r=affinity,rangetheta=c(0,0.01),niter=10,tolerance=0.001)
Iterations: 
Error in if (theta < 0 | theta > 20) { : 
  missing value where TRUE/FALSE needed
ud <-rspUD(traj=lt,affinity,theta=0.005)
  |===                                                                                                                                                    |   2%Error in if (theta < 0 | theta > 20) { : 
  missing value where TRUE/FALSE needed

While I can run them succesfully for ltraj objetcs of only one individual. Is it any way I can solve it for all individuals at once, or should I run it separetly for each animal, and join somehow the results afterwards?

Thank you very much for yur time!