Message-ID: <F98EEC1572248B4591FA7A827F1FBDF66921DAE65B@exch01.ans.umb.no>
Date: 2011-08-08T07:45:07Z
From: Natasa Djakovic
Subject: as.ltraj-adehabitatLT
In-Reply-To: <CAAcGz9_VSfrTkFtoRjsi-QzW6i+YPv1JdQ381Z6JUfzAw1AY-Q@mail.gmail.com>
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