[AniMov] cutltraj function error (adehabitatLT)
Jose Manuel de los Reyes
josemanuel.delosreyes at gmail.com
Mon Feb 16 13:32:45 CET 2015
I'm working with GPS dataset from seabirds that include more than one trip
for each burst, and currently I'm trying to split then automatically in
sub-burst based on a criterion.
To do that I'm trying to use the function cutltraj from AdehabitatLT R
package. Previously I removed all positions matching an specific condition,
so now, after applying the as.ltraj function, my dataframe has ltraj class
and I can use the dt field values as criterion to make the split.
This criterion is so simple: time between two position > 3600 (units in
seconds). This time is enough to determine when the burst need to be
I applied it:
df <- cutltraj (depurelt, dt>3600, nextr = TRUE)
According to this, a logical vector (with TRUE when criterion does match)
should work for splitting. If I check with the common datframe class, dt
field exists and it's correct, and the logical function dt>3600 run
correctly and I get a TRUE-FALSE vector.
However, when I run the function I got this error message:
Error in dt > 3600 :
comparison (6) is possible only for atomic and list types
Since ltraj class is in fact a list object, I don't understand why I get
If someone have any idea why is this happening, please let me know.
Thank you in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the AniMov