Skip to content
Prev 656 / 7420 Next

include Time in as.ltraj()

> id=All_1646$"Fish_ID", typeII = TRUE)
 > 
 > I get an error message 
 > "Error in as.ltraj(All_1646, date = All_1646$Datime, id =
 >  All_1646$Fish_ID,  : non unique dates for a given burst".
 > 
 > However, the Datime column does include the time of observation as
 > shown below. What am I doing wrong ?


Hard to say without any reproducible example... 
However, it seems that there are several errors in your code and data:
first, note that the first argument of the function (xy) should be a
data frame containing only the coordinates of the relocations of the
animal (presently, it also contains the date, the time, a column named
Datime, etc.). Please check that your arguments are correct.

Now, concerning your message, it is likely that several relocations
have been collected at exactly the same moment (i.e. for a given
Fish_ID, there are probably at least two relocations with the same
value of Datime). You can verify it:

ta <- table(All_1646$Fish_ID, All_1646$Datime)
any(ta>1)

look at this table: if there is any value >1, this means that there
are probably two relocations collected at the same date for a given
animal.
HTH,


Cl?ment Calenge.