[R-sig-eco] as.ltraj-adehabitatLT

Natasa Djakovic natasa.djakovic at umb.no
Mon Aug 8 09:45:07 CEST 2011


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

Natasa


>-----Original Message-----
>From: Michael Sumner [mailto:mdsumner at gmail.com]
>Sent: Monday, August 08, 2011 1:45 AM
>To: Natasa Djakovic
>Cc: r-sig-ecology at r-project.org
>Subject: Re: [R-sig-eco] as.ltraj-adehabitatLT
>
>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:
>> 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
>>
>> _______________________________________________
>> R-sig-ecology mailing list
>> R-sig-ecology at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>>
>
>
>
>--
>Michael Sumner
>Institute for Marine and Antarctic Studies, University of Tasmania
>Hobart, Australia
>e-mail: mdsumner at gmail.com


More information about the R-sig-ecology mailing list