Hi, I am exploring the trajectory analysis functions of the new adehabitatLT package and am coming across an error while I am trying to partition the trajectory using the function partmod.ltraj. Unfortunately I do not get the error on all data sets that I am working on, which is making it very difficult for me to track down exactly what the cause is. The error is "Error in if (prot > 1e-08) { : missing value where TRUE/FALSE needed"
As an example, the code below shows the process for one particular data set, the first completes successfully, while the second results in the above error: # Example 1 tested.means <- round(seq(0,20000, length=10),0) limod <- as.list(paste("dnorm(dist, mean=", tested.means, ", sd=750)")) (mod <- modpartltraj(tr3, limod)) bestpartmod(mod) (pm <- partmod.ltraj(tr3,14, mod)) # Example 2 tested.means <- round(seq(0,15000, length=10),0) limod <- as.list(paste("dnorm(dist, mean=", tested.means, ", sd=750)")) (mod <- modpartltraj(tr3, limod)) bestpartmod(mod) (pm <- partmod.ltraj(tr3,8, mod)) In the second example, I have only changed the upper bound of the set of models. As a result, the recommended number of partitions (bestpartmod) changes to 8, which I use to create 'pm' but the above error is the result. If I continue to reduce the number of partitions, it's finally successful at 3. Alternatively, if I reduce the upper bound of the model from 20000 to 16000 and also reduce the number of models from 10 to 8, it will also run successfully. If anyone has any experience with this or thoughts that might help, I would appreciate hearing from you. Thanks in advance Steve
_______________________________________________ AniMov mailing list AniMov@faunalia.it http://lists.faunalia.it/cgi-bin/mailman/listinfo/animov