Dear all,

   I have some bird movement data which I'm trying to analyse through the 
package adehabitatLT.
   It is collected by GPS with a location fix every 30 minutes. It has to be 
manually downloaded in the field etc., as a result it contains many gaps (half 
a day, a day, a couple of days...)
   I know it is an irregular trajectory and perhaps I shouldn't be analysing it 
through adehabitatLT.

   Although it seems to work fine so far and I regularized the trajectory 
through the steps outlined in the package, I now get the error : Error in 
1:indiceNA[lalo[i]] : NA/NaN argument.
   This is at the point where I'm trying to partition the trajectory. (code 
provided below)




Regularized trajectory (Breg) in R (has a lot of NA values -> came from 
irregular.

Breg:

head(Breg)

*********** List of class ltraj ***********

    Type of the traject: Type II (time recorded)

    * Time zone: UTC *

    Regular traject. Time lag between two locs: 900 seconds

    Characteristics of the bursts:

        id burst          nb.reloc   NAs          date.begin                  
date.end

    1 2172  2172     4449       1683        2015-08-07 00:22:00   2015-09-22 
08:22:00

     infolocs provided. The following variables are available:

    [1] "pkey"



    > head(Breg[[1]])

             x       y                    date                              dx  
dy    dist  dt        R2n                  abs.angle        rel.angle

    1 409662.0 6448915 2015-08-07 00:22:00 NA  NA   NA  900      0.000000       
 NA                    NA

    2       NA      NA            2015-08-07 00:37:00 NA  NA   NA  900      NA  
                 NA                    NA

    3 409663.9 6448913 2015-08-07 00:52:00 NA  NA   NA  900       9.245614      
NA                     NA

    4       NA      NA            2015-08-07 01:07:00 NA  NA   NA  900       NA 
                 NA                    NA

    5 409633.7 6448906 2015-08-07 01:22:00 NA  NA   NA  900       885.556316  
NA                    NA

    6       NA      NA            2015-08-07 01:37:00 NA  NA   NA  900       NA 
                 NA                    NA



    List of 1

     $ :'data.frame':            4449 obs. of  10 variables:

      ..$ x        : num [1:4449] 409662 NA 409664 NA 409634 ...

      ..$ y        : num [1:4449] 6448915 NA 6448913 NA 6448906 ...

      ..$ date     : POSIXct[1:4449], format: "2015-08-07 00:22:00" "2015-08-07 
 00:37:00" "2015-08-07 00:52:00" "2015-08-07 01:07:00" ...

      ..$ dx       : num [1:4449] NA NA NA NA NA NA NA NA NA NA ...

      ..$ dy       : num [1:4449] NA NA NA NA NA NA NA NA NA NA ...

      ..$ dist     : num [1:4449] NA NA NA NA NA NA NA NA NA NA ...

      ..$ dt       : num [1:4449] 900 900 900 900 900 900 900 900 900 900 ...

      ..$ R2n      : num [1:4449] 0 NA 9.25 NA 885.56 ...

      ..$ abs.angle: num [1:4449] NA NA NA NA NA NA NA NA NA NA ...

      ..$ rel.angle: num [1:4449] NA NA NA NA NA NA NA NA NA NA ...

      ..- attr(*, "id")= chr "2172"

      ..- attr(*, "burst")= chr "2172"

      ..- attr(*, "infolocs")='data.frame':      4449 obs. of  1 variable:

      .. ..$ pkey: int [1:4449] 1 NA 2 NA 3 NA 4 NA NA NA ...

     - attr(*, "class")= chr [1:2] "ltraj" "list"

     - attr(*, "typeII")= logi TRUE

     - attr(*, "regular")= logi TRUE

     - attr(*, "proj4string")=Formal class 'CRS' [package "sp"] with 1 slot

      .. ..@ projargs: chr NA

I'm following the Gueguen method for segmenting my  trajectory, explained in 
the adehabitatlt pdf: Analysis of Animal Movements in  R.                       
                                                                                
                                                                                
                                    I have created the models based on my 
tested means, got the probability densities for each model and estimated the 
number of segments:

    (limod <- as.list(paste("dnorm(dist, mean =", tested.means,",sd = 5000)")))

    mod <- modpartltraj(Breg, limod)

    bestpartmod(mod)

    Maximum likelihood for K =  4

But when i try to partition the trajectory into the 4 segments i get this error:

    > pm <- partmod.ltraj(Breg, 4, mod)

    Error in 1:indiceNA[lalo[i]] : NA/NaN argument

I'm not quite sure what it means, it looks like R is having problems finding 
the exact place to cut off between segments because of my NA values? Not sure 
how to get around it or if I'm in the wrong for even trying it at all.

Kind regards,

Sam Rycken



Sam Rycken MSc
PhD Candidate
School of Veterinary and Life Sciences
Murdoch University
South St, Murdoch 6150 WA
Mobile: 0497530868

_______________________________________________
AniMov mailing list
AniMov@lists.faunalia.it
https://lists.faunalia.it/cgi-bin/mailman/listinfo/animov

Reply via email to