Skip to content

as.ltraj-adehabitatLT

3 messages · Natasa Djakovic, Michael Sumner

#
Hi,

I'm trying to create an object of class ltray to store animal movements, but keep getting an error message: "Error in as.ltraj(xy = data.sini[, c("X", "Y")], date = da, id = data.sini$Name) : non unique dates for a given burst."

Does anyone have a suggestion how to solve this problem?

Kind regards,
Natasa
#
The error message says it all - there are duplicated date/times in the
"da" input for a given id. You should investigate these and either
edit or remove them so that the trajectory makes sense.

Something like this can show which ids/datetimes are duplicated, but
without having your data it's just a guess (and untested):
lapply(split(data.frame(da, data.sini$Name), data.sini$Name),
function(x) x[is.duplicated(x),])
On Mon, Aug 8, 2011 at 6:58 AM, Natasa Djakovic <natasa.djakovic at umb.no> wrote:

  
    
#
Thanks all! 
I have removed duplicates and it's working.

Natasa